#59: Save rmss for futher investigations
				
					
				
			For instance to plot a fair comparison, see [issues/59#issuecomment-1732](#59 (comment)).
This commit is contained in:
		@@ -4,7 +4,7 @@ import numpy as np
 | 
			
		||||
import os
 | 
			
		||||
from tqdm import tqdm
 | 
			
		||||
import csv
 | 
			
		||||
from utils import Color, denoise, iterativeMean, isARawImage, escapeFilePath, getColorChannel
 | 
			
		||||
from utils import Color, denoise, iterativeMean, isARawImage, escapeFilePath, getColorChannel, saveNpArray
 | 
			
		||||
import matplotlib.pyplot as plt
 | 
			
		||||
from scipy.ndimage import gaussian_filter
 | 
			
		||||
 | 
			
		||||
@@ -95,10 +95,6 @@ if (minColor is None or maxColor is None) and denoiser != 'mean':
 | 
			
		||||
    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 colors:
 | 
			
		||||
 
 | 
			
		||||
@@ -56,5 +56,6 @@ plt.title(f'RMS between both subgroups estimated PRNUs with {DENOISER} denoiser
 | 
			
		||||
plt.xlabel('Number of images of each subgroup')
 | 
			
		||||
plt.ylabel('RMS between both subgroups estimated PRNUs')
 | 
			
		||||
plt.plot(rmss)
 | 
			
		||||
saveNpArray('{setting}_rmss', rmss)
 | 
			
		||||
plt.savefig(f'{setting}_rms_between_estimated_prnu_of_2_subgroups.svg')
 | 
			
		||||
#plt.show()
 | 
			
		||||
 
 | 
			
		||||
@@ -119,4 +119,8 @@ def mergeSingleColorChannelImagesAccordingToBayerFilter(singleColorChannelImages
 | 
			
		||||
                newX, newY = [getNewIndex(index, offset) for index, offset in [(x, offsetX), (y, offsetY)]]
 | 
			
		||||
 | 
			
		||||
                multipleColorsImage[newX, newY] = pixel
 | 
			
		||||
    return multipleColorsImage
 | 
			
		||||
    return multipleColorsImage
 | 
			
		||||
 | 
			
		||||
def saveNpArray(fileName, npArray):
 | 
			
		||||
    with open(f'{fileName}.npy', 'wb') as f:
 | 
			
		||||
        np.save(f, npArray)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user