Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

how to calculate actual snr of image in matlab?

Asked by vipul utsav on 4 Dec 2012

how to calculate actual snr of image in matlab?


vipul utsav


1 Answer

Answer by Image Analyst on 4 Dec 2012
Accepted answer

Get the signal - that's your "true" noiseless image.

Get the noise - that's your actual noisy image minus the "true" noiseless image.

Divide them element by element, then take the mean over the whole image.


vipul utsav on 5 Dec 2012

if any element in noiseOnlyImage is zero(means that additive noisy array or image contain any element zero) then snr2 becomes infinite. snr1 have some value.

so why snr1 calculating is not better compared snr2?

Image Analyst on 5 Dec 2012

Well, what if your signal is 100 everywhere, and your noisy image is 100 plus or minus 100, so it goes from 0 to 200. Don't you agree that that is a very very noisy image and it should have a low signal to noise ratio? It's total noise - all over the place. But it's mean is still 100 - same as your signal. So just looking at the means, you can't tell the difference between your perfect noise-free signal and the incredibly noisy signal. How is that any good?

By the way, you can always omit pixels where the noise is zero if you want.

vipul utsav on 5 Dec 2012

thanks for your valuable guidance

Image Analyst

Contact us