Save mean of each color channel to merge them into a single image being

the mean of images

Otherwise for each color channel could use:

```py
plt.imsave(f'{fileName}.png', colorMean)
```
This commit is contained in:
Benjamin Loison 2024-04-25 16:00:23 +02:00
parent 4907d0c0fb
commit f88b6ec1a9
Signed by: Benjamin_Loison
SSH Key Fingerprint: SHA256:BtnEgYTlHdOg1u+RmYcDE0mnfz1rhv5dSbQ2gyxW8B8

View File

@ -9,6 +9,7 @@ from tqdm import tqdm
import csv
import rawpy
from utils import Color
import matplotlib.pyplot as plt
imagesFolderPath = 'rafael/arw'
imagesFolderPathFileName = imagesFolderPath.replace('/', '_')
@ -153,6 +154,9 @@ if denoiser == 'mean':
colorMean = ((colorMean * numberOfImagesInColorMean) + imageNpArray) / (numberOfImagesInColorMean + 1)
numberOfImagesInColorMean += 1
means[color] = colorMean
fileName = f'mean_{imagesFolderPathFileName}_{color}'
# Then use `merge_single_color_channel_images_according_to_bayer_filter.py` to consider all color channels, instead of saving this single color channel as an image.
saveNpArray(fileName, colorMean)
for color in colors:
mean = None