Ease support for single or multiple colors
This commit is contained in:
parent
cca81927dd
commit
faaf3eb263
@ -10,11 +10,14 @@ import csv
|
||||
import rawpy
|
||||
from utils import Color
|
||||
|
||||
imagesFolderPath = '/mnt/HDD0/raise'
|
||||
imagesFolderPath = 'rafael/arw'
|
||||
imagesFolderPathFileName = imagesFolderPath.replace('/', '_')
|
||||
denoiser = 'wavelet'
|
||||
denoiser = 'bilateral'
|
||||
|
||||
raiseNotFlatFields = False
|
||||
singleColorChannel = Color.GREEN_RIGHT
|
||||
|
||||
colors = Color if singleColorChannel is None else [singleColorChannel]
|
||||
|
||||
denoise = getattr(skimage.restoration, f'denoise_{denoiser}')
|
||||
|
||||
@ -33,7 +36,7 @@ if raiseNotFlatFields:
|
||||
|
||||
SKY = range(2_699, 2_807)
|
||||
WALL = range(2_807, 2_912)
|
||||
#imagesFileNames = [f'DSC0{imageIndex}.ARW' for imageIndex in SKY]
|
||||
imagesFileNames = [f'DSC0{imageIndex}.ARW' for imageIndex in SKY]
|
||||
|
||||
minColor = None
|
||||
maxColor = None
|
||||
@ -102,7 +105,7 @@ def treatImage(imageFileName, computeExtremes = False, color = None):
|
||||
|
||||
# Assuming same intensity scale across color channels.
|
||||
for imageFileName in tqdm(imagesFileNames, 'Computing extremes of images'):
|
||||
for color in Color:
|
||||
for color in colors:
|
||||
treatImage(imageFileName, computeExtremes = True, color = color)
|
||||
|
||||
# To skip this step next time.
|
||||
@ -110,7 +113,7 @@ for imageFileName in tqdm(imagesFileNames, 'Computing extremes of images'):
|
||||
print(f'{minColor=}')
|
||||
print(f'{maxColor=}')
|
||||
|
||||
for color in Color:
|
||||
for color in colors:
|
||||
mean = None
|
||||
numberOfImagesInMean = 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user