diff --git a/datasets/fake/generate_dataset.py b/datasets/fake/generate_dataset.py index 3233cce..30c7aa1 100644 --- a/datasets/fake/generate_dataset.py +++ b/datasets/fake/generate_dataset.py @@ -43,6 +43,20 @@ def showImageWithMatplotlib(npArray): plt.imshow(npArray) plt.show() +plt.title('RMS between actual PRNU and the mean of the first $N$ images with PRNU (i.e. estimated PRNU)') +plt.xlabel('$N$ first images with PRNU') +plt.ylabel('RMS') +rmss = [] +mean = 0 +for imageIndex in range(NUMBER_OF_IMAGES_PER_PHONE): + rms = rmsDiffNumpy(imagesWithPrnu[0][imageIndex], prnus[0]) + mean = ((mean * imageIndex) + rms) / (imageIndex + 1) + rmss += [mean] +plt.plot(rmss) +plt.show() + +## + NUMBER_OF_ROWS = 5 NUMBER_OF_COLUMNS = 3 fig, axes = plt.subplots(NUMBER_OF_ROWS, NUMBER_OF_COLUMNS)