Using MatLab to Calculate Signal to Noise Ratio

How do you use MatLab to calculate SNR?

Update

I only have one file, not two as in the example, and that is .tif.

+2


a source to share


3 answers


First google result for Matlab SNR . Copied from there in dB:

snr = 10*log10(sum(clean.^2) ./ sum(noise.^2))

      



EDIT: The signal-to-noise ratio cannot be calculated without knowing the signal strength and noise power. With only knowledge of the observed (ie, Received) signal, one can blindly estimate the SNR, but this is an open research topic. See Measuring Blind Quality.

+7


a source


The average noisy

and clean

should be zero:

signal = var(clean(:));
noise  = var(noisy(:)); 

s2n = 10*log10( signal / noise );

      



From: Comparing and Analyzing Different PDE-Based Approaches for Image Enhancement , p. 4.

+3


a source


From the input side:

Calculate DB1 = 10*log10(var(noiseSignal))
Calculate DB2 = 10*log10(var(cleanSpeechSignal))

      

SNR = DB2 - DB1

0


a source







All Articles