Compare commits
2 Commits
0bd9e57942
...
8523c02517
Author | SHA1 | Date | |
---|---|---|---|
8523c02517 | |||
3e332c19d8 |
@ -1,6 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from PIL import Image
|
||||
from utils import Color, mergeSingleColorChannelImagesAccordingToBayerFilter
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
@ -15,4 +14,4 @@ def getImageByColor(color):
|
||||
singleColorChannelImages = {color: getImageByColor(color) for color in Color}
|
||||
multipleColorsImage = mergeSingleColorChannelImagesAccordingToBayerFilter(singleColorChannelImages)
|
||||
|
||||
plt.imsave(PREFIX + 'multiple_colors.png', multipleColorsImage)
|
||||
plt.imsave(PREFIX + 'multiple_colors.png', multipleColorsImage)
|
||||
|
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from utils import Denoiser, Color, mergeSingleColorChannelImagesAccordingToBayerFilter
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
PREFIX = 'means/mean_rafael_230424_'
|
||||
|
||||
def getImageByColor(color):
|
||||
filePath = PREFIX + f'{color}.npy'
|
||||
image = np.load(filePath)
|
||||
return image
|
||||
|
||||
multipleColorsImageDenoisers = {}
|
||||
|
||||
DENOISERS = [
|
||||
Denoiser.BILATERAL,
|
||||
Denoiser.WAVELET,
|
||||
Denoiser.MEAN,
|
||||
]
|
||||
|
||||
for denoiser in DENOISERS:
|
||||
singleColorChannelImages = {color: getImageByColor(color) for color in Color}
|
||||
multipleColorsImage = mergeSingleColorChannelImagesAccordingToBayerFilter(singleColorChannelImages)
|
||||
multipleColorsImageDenoisers[denoiser] = multipleColorsImage
|
||||
|
||||
def getExtreme(extreme):
|
||||
vExtreme = extreme(list(multipleColorsImageDenoisers.values()))
|
||||
#print(vExtreme)
|
||||
return vExtreme
|
||||
|
||||
vMin, vMax = [getExtreme(extreme) for extreme in [np.min, np.max]]
|
||||
|
||||
for denoiser in DENOISERS:
|
||||
multipleColorsImage = multipleColorsImageDenoisers[denoiser]
|
||||
plt.imsave(PREFIX + f'{denoiser}_multiple_colors.png', multipleColorsImage)
|
Loading…
Reference in New Issue
Block a user