From 6ad8483990a9e92c7439847f06974dc93f4d7a9c Mon Sep 17 00:00:00 2001 From: Benjamin Loison Date: Thu, 23 May 2024 14:48:39 +0200 Subject: [PATCH] Add and use `COLOR` --- datasets/raise/extract_4_color_channel_images_from_raw.py | 5 +++-- 1 file changed, 3 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 9d455ad..9ed1a88 100644 --- a/datasets/raise/extract_4_color_channel_images_from_raw.py +++ b/datasets/raise/extract_4_color_channel_images_from_raw.py @@ -7,15 +7,16 @@ Y_RANGE = 5 X_RANGE = 25 ORIGINAL_INTERESTING_POSITION = [5752, 1695][::-1] INTERESTING_POSITION = np.array(ORIGINAL_INTERESTING_POSITION) // 2 +COLOR = Color.RED def getImageFilePath(imageIndex): return f'../rafael/240424/photos/DSC0{imageIndex}.ARW' def getImageColorChannel(imageIndex, color): imageFilePath = getImageFilePath(imageIndex) - return getColorChannel(imageFilePath, Color.RED) + return getColorChannel(imageFilePath, color) -colorChannel = getImageColorChannel(IMAGE_INDEX, Color.RED) +colorChannel = getImageColorChannel(IMAGE_INDEX, COLOR) print(colorChannel.shape) def crop(image, interestingPosition, yRange, xRange):