Make split_and_compare_prnus_of_subgroups.py executable from terminal

Used to be only executable from Pyzo.
This commit is contained in:
Benjamin Loison 2024-04-27 16:55:03 +02:00
parent c8fe71444f
commit 643fee9f4a
No known key found for this signature in database

4
datasets/raise/split_and_compare_prnus_of_subgroups.py Normal file → Executable file
View File

@ -1,3 +1,5 @@
#!/usr/bin/python3
from PIL import Image
import numpy as np
import matplotlib.pyplot as plt
@ -32,8 +34,6 @@ for subgroupIndex in tqdm(range(NUMBER_OF_SUBGROUPS), 'Subgroup'):
imagePil = Image.open(imagePath)
imageNpArray = img_as_float(np.array(imagePil))
imagePrnuEstimateNpArray = imageNpArray - denoise(imageNpArray, DENOISER)
imagesPrnuEstimateNpArray += [imagePrnuEstimateNpArray]
subgroupIterativeMean.add(imagePrnuEstimateNpArray)
subgroupPrnuEstimateNpArray += [subgroupIterativeMean.mean]