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

# how to calculate signal to noise ratio of color image?

Asked by ARUN SAI on 14 Apr 2013

is this right way to calculate SNR of a color image using SNR = μ/sqrt( LSD max) where μ-average gray of color image.And how to calculate average gray of color image....

## Products

Answer by Image Analyst on 14 Apr 2013

I would not say that. Why do you think the mean gray level of the image is the true signal? It may be for some pixels, but for other pixels, that are supposed to be bright or dark, the signal is not the mean. You need to get the signal and the noise. If you don't have that then you need to make assumptions, like the true signal is the average of pixels in a 3 by 3 window around the pixel and the noise is the standard deviation in that window. So you'll have a mean image (like you can get with conv2()) and a standard deviation image (which you can get with stdfilt()). Then divide the images to get the SNR on a pixel by pixel basis and then take the average of all those values.

ARUN SAI on 14 Apr 2013