#21: Incorrect mean, as it is a RMS mean, not a mean of images

This commit is contained in:
Benjamin Loison 2024-03-26 01:55:08 +01:00
parent f181a3498c
commit c2862eaf43
Signed by: Benjamin_Loison
SSH Key Fingerprint: SHA256:BtnEgYTlHdOg1u+RmYcDE0mnfz1rhv5dSbQ2gyxW8B8

View File

@ -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)