Add and use saveNpArray
This commit is contained in:
parent
65708e4977
commit
4907d0c0fb
@ -136,6 +136,10 @@ if minColor is None or maxColor is None:
|
||||
print(f'{minColor=}')
|
||||
print(f'{maxColor=}')
|
||||
|
||||
def saveNpArray(fileName, npArray):
|
||||
with open(f'{fileName}.npy', 'wb') as f:
|
||||
np.save(f, npArray)
|
||||
|
||||
if denoiser == 'mean':
|
||||
means = {}
|
||||
for color in Color:
|
||||
@ -157,6 +161,5 @@ for color in colors:
|
||||
for imageFileName in tqdm(imagesFileNames, f'Denoising images for color {color}'):
|
||||
treatImage(imageFileName, color = color)
|
||||
|
||||
npArrayFilePath = f'mean_{imagesFolderPathFileName}_{denoiser}_{color}.npy'
|
||||
with open(npArrayFilePath, 'wb') as f:
|
||||
np.save(f, mean)
|
||||
npArrayFilePath = f'mean_{imagesFolderPathFileName}_{denoiser}_{color}'
|
||||
saveNpArray(npArrayFilePath, mean)
|
||||
|
Loading…
Reference in New Issue
Block a user