From 31da324702a241304d89113e7ec2d3819534229d Mon Sep 17 00:00:00 2001 From: Benjamin Loison Date: Wed, 5 Jun 2024 16:41:44 +0200 Subject: [PATCH] Compute mean PRNU estimate from scratch --- datasets/raise/fft/verify_dots.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/datasets/raise/fft/verify_dots.py b/datasets/raise/fft/verify_dots.py index 99760fb..af744ac 100644 --- a/datasets/raise/fft/verify_dots.py +++ b/datasets/raise/fft/verify_dots.py @@ -12,19 +12,26 @@ folder = '../rafael/230424' meanImages = iterativeMean() filePaths = [f'{folder}/{file}' for file in os.listdir(folder) if isARawImage(file)] -for filePath in tqdm(filePaths): +for filePath in tqdm(filePaths, 'Compute mean image'): imageColorChannels = {color: getColorChannel(filePath, color) for color in Color} imageMergedColorChannels = mergeSingleColorChannelImagesAccordingToBayerFilter(imageColorChannels) meanImages.add(imageMergedColorChannels) + #plt.imshow(imageMergedColorChannels) + #plt.show() + #break -#print(meanImages.mean.shape) +#plt.imshow(meanImages.mean) +#plt.show() # Is not there anything clever than this to do? See [Robust_image_source_identification_on_modern_smartphones/issues/72](https://gitea.lemnoslife.com/Benjamin_Loison/Robust_image_source_identification_on_modern_smartphones/issues/72). estimatedPrnu = iterativeMean() -for filePath in tqdm(filePaths): +for filePath in tqdm(filePaths, 'Compute estimated PRNU'): imageColorChannels = {color: getColorChannel(filePath, color) for color in Color} imageMergedColorChannels = mergeSingleColorChannelImagesAccordingToBayerFilter(imageColorChannels) estimatedPrnu.add(imageMergedColorChannels - meanImages.mean) + #plt.imshow(estimatedPrnu.mean) + #plt.show() + #break plt.imshow(estimatedPrnu.mean) plt.show() \ No newline at end of file