SNR - Compute the SNR between two images C omputes the SNR between the maps map_init and map_recon. The SNR is computed by 10 * log10( var(MAP_INIT) / var(MAP_INIT-MAP_NOISY) ) where var stands for the matlab built-in function that computes the variance. Inputs: - map_init: Initial image. - map_recon: Reconstructed image. Outputs: - snr: SNR.
0001 function snr = sopt_mltb_SNR(map_init, map_recon) 0002 % SNR - Compute the SNR between two images 0003 % 0004 % C omputes the SNR between the maps map_init and map_recon. The SNR is 0005 % computed by 0006 % 10 * log10( var(MAP_INIT) / var(MAP_INIT-MAP_NOISY) ) 0007 % where var stands for the matlab built-in function that computes the 0008 % variance. 0009 % 0010 % Inputs: 0011 % 0012 % - map_init: Initial image. 0013 % 0014 % - map_recon: Reconstructed image. 0015 % 0016 % Outputs: 0017 % 0018 % - snr: SNR. 0019 0020 noise = map_init(:)-map_recon(:); 0021 var_init = var(map_init(:)); 0022 var_den = var(noise(:)); 0023 snr = 10 * log10(var_init/var_den); 0024 0025 end