Try to have clear figure for thesis audition

This commit is contained in:
Benjamin Loison 2024-04-03 15:20:24 +02:00
parent aafb7ebc92
commit d3af12ce3e
Signed by: Benjamin_Loison
SSH Key Fingerprint: SHA256:BtnEgYTlHdOg1u+RmYcDE0mnfz1rhv5dSbQ2gyxW8B8

View File

@ -7,19 +7,20 @@ import sys
sys.path.insert(0, '../../algorithms/image_utils/')
from image_utils import showImageWithMatplotlib
from image_utils import showImageWithMatplotlib, toPilImage
sys.path.insert(0, '../../algorithms/distance/')
from rms_diff import rmsDiffNumpy
NUMBER_OF_SUBGROUPS = 2
NUMBER_OF_SUBGROUPS = 1
IMAGES_FOLDER = 'flat-field/TIF'
imagesFileNames = os.listdir(IMAGES_FOLDER)
numberOfImagesPerSubgroup = len(imagesFileNames) // NUMBER_OF_SUBGROUPS
numberOfImagesThresholds = range(1, numberOfImagesPerSubgroup + 1)
# 1
numberOfImagesThresholds = range(numberOfImagesPerSubgroup, numberOfImagesPerSubgroup + 1)
# Assume random image order to not introduce a bias.
subgroupsPrnuEstimatesNpArray = []
@ -36,6 +37,7 @@ for subgroupIndex in range(NUMBER_OF_SUBGROUPS):
# Not efficient mean computation.
for numberOfImagesIndex, numberOfImages in enumerate(numberOfImagesThresholds):
subgroupPrnuEstimateNpArray += [np.array(imagesPrnuEstimateNpArray[:numberOfImages]).mean(axis = 0)]
toPilImage(subgroupPrnuEstimateNpArray[-1]).save('prnu.png')
subgroupsPrnuEstimatesNpArray += [subgroupPrnuEstimateNpArray]
rmss = []