Add and use getImageColorChannel

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

View File

@ -11,8 +11,11 @@ INTERESTING_POSITION = np.array(ORIGINAL_INTERESTING_POSITION) // 2
def getImageFilePath(imageIndex):
return f'../rafael/240424/photos/DSC0{imageIndex}.ARW'
imageFilePath = getImageFilePath(IMAGE_INDEX)
colorChannel = getColorChannel(imageFilePath, Color.RED)
def getImageColorChannel(imageIndex, color):
imageFilePath = getImageFilePath(imageIndex)
return getColorChannel(imageFilePath, Color.RED)
colorChannel = getImageColorChannel(IMAGE_INDEX, Color.RED)
print(colorChannel.shape)
def crop(image, interestingPosition, yRange, xRange):