Add and use getImageFilePath

This commit is contained in:
Benjamin Loison 2024-05-23 14:47:25 +02:00
parent 95d4d841c4
commit 3c983b0690
Signed by: Benjamin_Loison
SSH Key Fingerprint: SHA256:BtnEgYTlHdOg1u+RmYcDE0mnfz1rhv5dSbQ2gyxW8B8

View File

@ -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):