Compare PRNUs

This commit is contained in:
Benjamin Loison 2024-06-11 17:54:29 +02:00
parent c2cf139261
commit 715b5296c9
Signed by: Benjamin_Loison
SSH Key Fingerprint: SHA256:BtnEgYTlHdOg1u+RmYcDE0mnfz1rhv5dSbQ2gyxW8B8

View File

@ -6,7 +6,7 @@ import sys
sys.path.insert(0, '../')
from utils import isARawImage, Color, getColorChannel, mergeSingleColorChannelImagesAccordingToBayerFilter, iterativeMean
from utils import isARawImage, Color, getColorChannel, mergeSingleColorChannelImagesAccordingToBayerFilter, iterativeMean, getPearsonCorrelationDistance
FOLDERS = {
'Rafael 23/04/24': '../rafael/230424',
@ -34,7 +34,15 @@ def getEstimatedPrnu(folder):
estimatedPrnu.add(imageMergedColorChannels - meanImages.mean)
return estimatedPrnu.mean
estimatedPrnu = getEstimatedPrnu(FOLDERS['Rafael 23/04/24'])
estimatedPrnus = {folderName: getEstimatedPrnu(folder) for folderName, folder in FOLDERS.items()}
plt.imshow(estimatedPrnu)
# TODO: largest common crop
print(f'{corr(estimatedPrnus["Rafael 23/04/24"], estimatedPrnus["Rafael 23/04/24"])=}')
print(f'{corr(estimatedPrnus["Rafael 23/04/24"], estimatedPrnus["RAISE flat-field"])=}')
print(f'{corr(estimatedPrnus["RAISE flat-field"], estimatedPrnus["Rafael 23/04/24"])=}')
print(f'{corr(estimatedPrnus["Rafael 23/04/24"], estimatedPrnus["RAISE not flat-field"])=}')
print(f'{corr(estimatedPrnus["RAISE flat-field"], estimatedPrnus["RAISE not flat-field"])=}')
plt.imshow(estimatedPrnus['RAISE flat-field'])
plt.show()