Rename means
to colorMeans
To be clearer for future `attribute_source_camera.py` usage.
This commit is contained in:
parent
d8c7b8b0ef
commit
01d18a4943
@ -75,7 +75,7 @@ def treatImage(imageFileName, computeExtremes = False, color = None):
|
||||
if denoiser != 'mean':
|
||||
imageDenoisedNpArray = denoise(imageNpArray, denoiser)
|
||||
else:
|
||||
imageDenoisedNpArray = means[color]
|
||||
imageDenoisedNpArray = colorMeans[color]
|
||||
imageNoiseNpArray = imageNpArray - imageDenoisedNpArray
|
||||
estimatedPrnuIterativeMean.add(imageNoiseNpArray)
|
||||
|
||||
@ -91,14 +91,14 @@ if (minColor is None or maxColor is None) and denoiser != 'mean':
|
||||
print(f'{maxColor=}')
|
||||
|
||||
if denoiser == 'mean':
|
||||
means = {}
|
||||
colorMeans = {}
|
||||
for color in colors:
|
||||
colorIterativeMean = iterativeMean()
|
||||
for imageFileName in tqdm(imagesFileNames, f'Computing mean of {color} colored images'):
|
||||
imageNpArray = getImageNpArray(imageFileName, False, color)
|
||||
imageNpArray = gaussian_filter(imageNpArray, sigma = 5)
|
||||
colorIterativeMean.add(imageNpArray)
|
||||
means[color] = colorIterativeMean.mean
|
||||
colorMeans[color] = colorIterativeMean.mean
|
||||
fileName = f'mean_{imagesFolderPathFileName}_{color}'
|
||||
# Then use `merge_single_color_channel_images_according_to_bayer_filter.py` to consider all color channels, instead of saving this single color channel as an image.
|
||||
saveNpArray(fileName, colorIterativeMean.mean)
|
||||
|
Loading…
x
Reference in New Issue
Block a user