Files
Robust_image_source_identif…/datasets/raise/merge_single_color_channel_images_according_to_bayer_filter.py
2024-05-02 13:07:03 +02:00

18 lines
569 B
Python
Executable File

#!/usr/bin/env python
from PIL import Image
from utils import Color, mergeSingleColorChannelImagesAccordingToBayerFilter
import matplotlib.pyplot as plt
import numpy as np
PREFIX = 'mean_rafael_arw_sky_mean_'
def getImageByColor(color):
filePath = PREFIX + f'{color}.npy'
image = np.load(filePath)
return image
singleColorChannelImages = {color: getImageByColor(color) for color in Color}
multipleColorsImage = mergeSingleColorChannelImagesAccordingToBayerFilter(singleColorChannelImages)
plt.imsave(PREFIX + 'multiple_colors.png', multipleColorsImage)