Make Gaussian noise in getPrnuShownAsSuch
only on text
This commit is contained in:
@@ -25,17 +25,14 @@ datasetPath = 'no_noise_images'
|
||||
# In addition to the range difference, note that the distribution in the first set of images was a Gaussian and here is very different and specific.
|
||||
PRNU_FACTOR = 0.01
|
||||
NOISE_FACTOR = 0.1
|
||||
SPLIT_N_X_N = 4
|
||||
SPLIT_N_X_N = 1
|
||||
|
||||
IMAGE_SIZE_SHAPE = [dimension // SPLIT_N_X_N for dimension in (704, 469)]
|
||||
|
||||
np.random.seed(0)
|
||||
|
||||
#prnuNpArray = 255 * randomGaussianImage(scale = PRNU_FACTOR, size = IMAGE_SIZE_SHAPE)
|
||||
prnuNpArray = getPrnuShownAsSuch(IMAGE_SIZE_SHAPE, 100) * PRNU_FACTOR
|
||||
showImageWithMatplotlib(prnuNpArray)
|
||||
|
||||
##
|
||||
prnuNpArray = getPrnuShownAsSuch(IMAGE_SIZE_SHAPE, 255) * PRNU_FACTOR
|
||||
|
||||
def isIn256Range(x):
|
||||
return 0 <= x and x <= 255
|
||||
|
Reference in New Issue
Block a user