Remove implicit getColorMeans
denoiser
argument
This commit is contained in:
parent
0c429aa4d6
commit
9fd44debf5
@ -74,7 +74,7 @@ def getImagePrnuEstimateNpArray(singleColorChannelImages, multipleColorsImage, c
|
||||
return imagePrnuEstimateNpArray
|
||||
|
||||
imagesCamerasFilePaths = {camera: [f'{IMAGES_CAMERAS_FOLDER[camera]}/{imagesCamerasFileName}' for imagesCamerasFileName in imagesCamerasFileNames[camera]] for camera in imagesCamerasFileNames}
|
||||
cameraColorMeans = {camera: getColorMeans(imagesCamerasFilePaths[camera], Color, DENOISER, minimalColorChannelCameraResolution) for camera in imagesCamerasFilePaths}
|
||||
cameraColorMeans = {camera: getColorMeans(imagesCamerasFilePaths[camera], Color, minimalColorChannelCameraResolution) for camera in imagesCamerasFilePaths}
|
||||
|
||||
from utils import silentTqdm
|
||||
#tqdm = silentTqdm
|
||||
|
@ -80,7 +80,7 @@ if (minColor is None or maxColor is None) and DENOISER != 'mean':
|
||||
print(f'{maxColor=}')
|
||||
|
||||
if DENOISER == 'mean':
|
||||
colorMeans = getColorMeans(imagesFileNames, COLORS, DENOISER)
|
||||
colorMeans = getColorMeans(imagesFileNames, COLORS)
|
||||
for color in Color:
|
||||
colorMeans[color] = colorMeans[color]
|
||||
fileName = f'mean_{imagesFolderPathFileName}_{color}'
|
||||
|
@ -132,12 +132,12 @@ def updateExtremes(imageNpArray, minColor, maxColor):
|
||||
def print(*toPrint):
|
||||
__builtin__.print(datetime.now(), *toPrint)
|
||||
|
||||
def getColorMeans(imagesFileNames, colors, denoiser, singleColorChannelCropResolution = None):
|
||||
def getColorMeans(imagesFileNames, colors, singleColorChannelCropResolution = None):
|
||||
colorMeans = {}
|
||||
for color in colors:
|
||||
colorIterativeMean = iterativeMean()
|
||||
for imageFileName in tqdm(imagesFileNames, f'Computing mean of {color} colored images'):
|
||||
imageNpArray = getImageNpArray(imageFileName, False, color, denoiser)
|
||||
imageNpArray = getImageNpArray(imageFileName, False, color, 'mean')
|
||||
if singleColorChannelCropResolution is not None:
|
||||
imageNpArray = getImageCrop(imageNpArray, singleColorChannelCropResolution)
|
||||
imageNpArray = gaussian_filter(imageNpArray, sigma = 5)
|
||||
|
Loading…
x
Reference in New Issue
Block a user