From 790c0d6da4241b276120cd86460acc38207ac192 Mon Sep 17 00:00:00 2001 From: Benjamin Loison <12752145+Benjamin-Loison@users.noreply.github.com> Date: Fri, 3 May 2024 02:27:07 +0200 Subject: [PATCH] Add and use `getImageFilePath` --- datasets/raise/extract_noise.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/datasets/raise/extract_noise.py b/datasets/raise/extract_noise.py index c583f48..220540d 100755 --- a/datasets/raise/extract_noise.py +++ b/datasets/raise/extract_noise.py @@ -46,13 +46,17 @@ if type_ is not None: minColor = None maxColor = None -def getImageNpArray(imageFileName, computeExtremes, color): - global minColor, maxColor +def getImageFilePath(imageFileName): if raiseNotFlatFields: imageFileName = imageFileName.replace('.png', '.NEF') imageFilePath = f'{imagesFolderPath}/nef/{imageFileName}' else: imageFilePath = f'{imagesFolderPath}/{imageFileName}' + return imageFilePath + +def getImageNpArray(imageFileName, computeExtremes, color): + global minColor, maxColor + imageFilePath = getImageFilePath(imageFileName) imageNpArray = getColorChannel(imageFilePath, color) if computeExtremes: