Use an intermediary variable in getImageColorChannel

This commit is contained in:
Benjamin Loison 2024-06-11 17:35:26 +02:00
parent 0c7108b3ec
commit a9861a761f
Signed by: Benjamin_Loison
SSH Key Fingerprint: SHA256:BtnEgYTlHdOg1u+RmYcDE0mnfz1rhv5dSbQ2gyxW8B8

View File

@ -15,7 +15,8 @@ def getImageFilePath(imageIndex):
def getImageColorChannel(imageIndex, color):
imageFilePath = getImageFilePath(imageIndex)
return getColorChannel(imageFilePath, color)
colorChannel = getColorChannel(imageFilePath, color)
return colorChannel
def crop(image, interestingPosition, yRange, xRange):
return image[interestingPosition[0] - yRange: interestingPosition[0] + yRange, interestingPosition[1] - xRange: interestingPosition[1] + xRange]