Make merge_single_color_channel_images_according_to_bayer_filter.py
more general
This commit is contained in:
parent
5ea0a862c0
commit
9b2f2281e4
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user