Add and use COLOR

This commit is contained in:
2024-05-23 14:48:39 +02:00
parent cc05f5c210
commit 6ad8483990

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