From 3c983b0690b5503c763fb5baf68c77dd47cb600b Mon Sep 17 00:00:00 2001 From: Benjamin Loison Date: Thu, 23 May 2024 14:47:25 +0200 Subject: [PATCH] Add and use `getImageFilePath` --- datasets/raise/extract_4_color_channel_images_from_raw.py | 8 ++++++-- 1 file changed, 6 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 a3a6d07..74ee852 100644 --- a/datasets/raise/extract_4_color_channel_images_from_raw.py +++ b/datasets/raise/extract_4_color_channel_images_from_raw.py @@ -2,13 +2,17 @@ import numpy as np import matplotlib.pyplot as plt from utils import Color, getColorChannel -IMAGE_FILE_PATH = '../rafael/240424/photos/DSC03294.ARW' +IMAGE_INDEX = 3294 Y_RANGE = 5 X_RANGE = 25 ORIGINAL_INTERESTING_POSITION = [5752, 1695][::-1] INTERESTING_POSITION = np.array(ORIGINAL_INTERESTING_POSITION) // 2 -colorChannel = getColorChannel(IMAGE_FILE_PATH, Color.RED) +def getImageFilePath(imageIndex): + return f'../rafael/240424/photos/DSC0{imageIndex}.ARW' + +imageFilePath = getImageFilePath(IMAGE_INDEX) +colorChannel = getColorChannel(imageFilePath, Color.RED) print(colorChannel.shape) def crop(image, interestingPosition, yRange, xRange):