Rename randomImage to randomGaussianImage

This commit is contained in:
Benjamin Loison 2024-03-28 16:18:32 +01:00
parent 64eaeddf98
commit 70ccb094d5
Signed by: Benjamin_Loison
SSH Key Fingerprint: SHA256:BtnEgYTlHdOg1u+RmYcDE0mnfz1rhv5dSbQ2gyxW8B8

View File

@ -22,12 +22,12 @@ IMAGE_SIZE_SHAPE = (IMAGE_SIZE, IMAGE_SIZE)
# Generate PRNUs and images of phones.
# Is such `np.maximum` probabilistically correct with our theoretical method? See #19.
def randomImage(scale):
def randomGaussianImage(scale):
return np.random.normal(loc = 0, scale = scale, size = IMAGE_SIZE_SHAPE)
imagesWithoutPrnu = [[randomImage(scale = 1) for _ in range(NUMBER_OF_IMAGES_PER_PHONE)] for phoneIndex in range(NUMBER_OF_PHONES)]
imagesWithoutPrnu = [[randomGaussianImage(scale = 1) for _ in range(NUMBER_OF_IMAGES_PER_PHONE)] for phoneIndex in range(NUMBER_OF_PHONES)]
prnus = [randomImage(scale = PRNU_FACTOR) for _ in range(NUMBER_OF_PHONES)]
prnus = [randomGaussianImage(scale = PRNU_FACTOR) for _ in range(NUMBER_OF_PHONES)]
imagesWithPrnu = [[imageWithoutPrnu + prnus[phoneIndex] for imageWithoutPrnu in imagesWithoutPrnu[phoneIndex]] for phoneIndex in range(NUMBER_OF_PHONES)]