MATLAB Answers

vipul utsav

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?


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.


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?

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.

thanks for your valuable guidance

Join the 15-year community celebration.

Play games and win prizes!

Learn more
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

MATLAB Academy

New to MATLAB?

Learn MATLAB today!