Add and use COLOR

This commit is contained in:
Benjamin Loison 2024-05-23 14:48:39 +02:00
parent cc05f5c210
commit 6ad8483990
Signed by: Benjamin_Loison
SSH Key Fingerprint: SHA256:BtnEgYTlHdOg1u+RmYcDE0mnfz1rhv5dSbQ2gyxW8B8

View File

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