Add color scales
This commit is contained in:
parent
dd7a6892e5
commit
a17ec28cc3
@ -34,7 +34,12 @@ SPLIT_N_X_N_S = [1, 2, 4]
|
||||
fig, axes = plt.subplots(2, 4)
|
||||
fig.suptitle('PRNU estimation with different number of images having Gaussian noise and Gaussian noised PRNU')
|
||||
|
||||
def axisImShow(axis, im):
|
||||
imShow = axis.imshow(im)
|
||||
plt.colorbar(imShow, label = 'Intensity', ax = axis, orientation = 'horizontal')
|
||||
|
||||
for splitNXNIndex, splitNXN in enumerate(SPLIT_N_X_N_S):
|
||||
print(f'{splitNXN=}')
|
||||
IMAGE_SIZE_SHAPE = [dimension // splitNXN for dimension in (704, 469)]
|
||||
|
||||
#prnuNpArray = 255 * randomGaussianImage(scale = PRNU_FACTOR, size = IMAGE_SIZE_SHAPE)
|
||||
@ -67,16 +72,16 @@ for splitNXNIndex, splitNXN in enumerate(SPLIT_N_X_N_S):
|
||||
axis = axes[0]
|
||||
|
||||
axis[0].set_title('First image without noise')
|
||||
axis[0].imshow(imageWithoutPrnuNpArrayTile)
|
||||
axisImShow(axis[0], imageWithoutPrnuNpArrayTile)
|
||||
|
||||
axis[1].set_title('Actual Gaussian noised PRNU')
|
||||
axis[1].imshow(prnuNpArray)
|
||||
axisImShow(axis[1], prnuNpArray)
|
||||
|
||||
axis[2].set_title('F. i. with G. n.')
|
||||
axis[2].imshow(imageWithoutPrnuNpArray + imageNoise)
|
||||
axisImShow(axis[2], imageWithoutPrnuNpArray + imageNoise)
|
||||
|
||||
axis[3].set_title('F. i. with G. n. and PRNU')
|
||||
axis[3].imshow(imageWithoutPrnuNpArray + prnuNpArray + imageNoise)
|
||||
axisImShow(axis[3], imageWithoutPrnuNpArray + prnuNpArray + imageNoise)
|
||||
isFirstImage = False
|
||||
|
||||
#assert all([isIn256Range(extreme) for extreme in [imageWithPrnuNpArray.max(), imageWithPrnuNpArray.min()]]), 'Adding the PRNU resulted in out of 256 bounds image'
|
||||
|
Loading…
x
Reference in New Issue
Block a user