Ease providing {min,max}Color

This commit is contained in:
Benjamin Loison 2024-04-25 15:30:23 +02:00
parent c642fa430e
commit 60a4f78fa6
Signed by: Benjamin_Loison
SSH Key Fingerprint: SHA256:BtnEgYTlHdOg1u+RmYcDE0mnfz1rhv5dSbQ2gyxW8B8

View File

@ -125,15 +125,16 @@ def treatImage(imageFileName, computeExtremes = False, color = None):
mean = ((mean * numberOfImagesInMean) + imageNoiseNpArray) / (numberOfImagesInMean + 1)
numberOfImagesInMean += 1
# Assuming same intensity scale across color channels.
for imageFileName in tqdm(imagesFileNames, 'Computing extremes of images'):
for color in colors:
treatImage(imageFileName, computeExtremes = True, color = color)
if minColor is None or maxColor is None:
# Assuming same intensity scale across color channels.
for imageFileName in tqdm(imagesFileNames, 'Computing extremes of images'):
for color in colors:
treatImage(imageFileName, computeExtremes = True, color = color)
# To skip this step next time.
# Maybe thanks to `rawpy.RawPy` fields, possibly stating device maximal value, can avoid doing so to some extent.
print(f'{minColor=}')
print(f'{maxColor=}')
# To skip this step next time.
# Maybe thanks to `rawpy.RawPy` fields, possibly stating device maximal value, can avoid doing so to some extent.
print(f'{minColor=}')
print(f'{maxColor=}')
if denoiser == 'mean':
means = {}