Try to have clear figure for thesis audition
This commit is contained in:
parent
aafb7ebc92
commit
d3af12ce3e
@ -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 = []
|
||||
|
Loading…
Reference in New Issue
Block a user