diff --git a/datasets/raise/merge_single_color_channel_images_according_to_bayer_filter.py b/datasets/raise/merge_single_color_channel_images_according_to_bayer_filter.py index 0f6e29d..d3e09d8 100755 --- a/datasets/raise/merge_single_color_channel_images_according_to_bayer_filter.py +++ b/datasets/raise/merge_single_color_channel_images_according_to_bayer_filter.py @@ -13,18 +13,15 @@ def getImageByColor(color): image = np.load(filePath) return image -color = Color.BLUE -image = getImageByColor(color) -width, height = image.shape - -multipleColorsImage = np.empty([dimension * 2 for dimension in image.shape], dtype = np.float64) - def getNewIndex(index, offset): newIndex = (index - offset) * 2 + offset return newIndex for color in tqdm(Color, 'Color'): colorImage = getImageByColor(color) + if color == list(Color)[0]: + width, height = colorImage.shape + multipleColorsImage = np.empty([dimension * 2 for dimension in colorImage.shape], dtype = np.float64) for y in tqdm(range(height), 'Height'): for x in range(width): pixel = colorImage[x, y]