From cc05f5c210f5691b0ec3b68262ddb2f9137701f0 Mon Sep 17 00:00:00 2001 From: Benjamin Loison Date: Thu, 23 May 2024 14:48:11 +0200 Subject: [PATCH] Add and use `getImageColorChannel` --- datasets/raise/extract_4_color_channel_images_from_raw.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/datasets/raise/extract_4_color_channel_images_from_raw.py b/datasets/raise/extract_4_color_channel_images_from_raw.py index 74ee852..9d455ad 100644 --- a/datasets/raise/extract_4_color_channel_images_from_raw.py +++ b/datasets/raise/extract_4_color_channel_images_from_raw.py @@ -11,8 +11,11 @@ INTERESTING_POSITION = np.array(ORIGINAL_INTERESTING_POSITION) // 2 def getImageFilePath(imageIndex): return f'../rafael/240424/photos/DSC0{imageIndex}.ARW' -imageFilePath = getImageFilePath(IMAGE_INDEX) -colorChannel = getColorChannel(imageFilePath, Color.RED) +def getImageColorChannel(imageIndex, color): + imageFilePath = getImageFilePath(imageIndex) + return getColorChannel(imageFilePath, Color.RED) + +colorChannel = getImageColorChannel(IMAGE_INDEX, Color.RED) print(colorChannel.shape) def crop(image, interestingPosition, yRange, xRange):