diff --git a/datasets/raise/extract_4_color_channel_images_from_raw.py b/datasets/raise/extract_4_color_channel_images_from_raw.py index 9ed1a88..0c35b5f 100644 --- a/datasets/raise/extract_4_color_channel_images_from_raw.py +++ b/datasets/raise/extract_4_color_channel_images_from_raw.py @@ -14,16 +14,19 @@ def getImageFilePath(imageIndex): def getImageColorChannel(imageIndex, color): imageFilePath = getImageFilePath(imageIndex) - return getColorChannel(imageFilePath, color) + return getColorChannel(imageFilePath, color).astype(np.int32) -colorChannel = getImageColorChannel(IMAGE_INDEX, COLOR) -print(colorChannel.shape) +firstColorChannel = getImageColorChannel(IMAGE_INDEX, COLOR) +secondColorChannel = getImageColorChannel(IMAGE_INDEX + 1, COLOR) +differenceColorChannel = firstColorChannel - secondColorChannel +print(differenceColorChannel.shape) def crop(image, interestingPosition, yRange, xRange): return image[interestingPosition[0] - yRange: interestingPosition[0] + yRange, interestingPosition[1] - xRange: interestingPosition[1] + xRange] #colorChannel = crop(multipleColorsImage, ORIGINAL_INTERESTING_POSITION, Y_RANGE, X_RANGE) -colorChannel = crop(colorChannel, INTERESTING_POSITION, Y_RANGE, X_RANGE) -print(colorChannel.shape) -plt.imshow(colorChannel) +colorChannelToDisplay = differenceColorChannel +colorChannelToDisplay = crop(colorChannelToDisplay, INTERESTING_POSITION, Y_RANGE, X_RANGE) +print(colorChannelToDisplay.shape) +plt.imshow(colorChannelToDisplay) plt.show() \ No newline at end of file