MATLAB: Calculation SNR of image

calculate snr

Hello everyone,
I need to calculate SNR in edge target image (half black and half white). How can i do this? I thought to take black part of the image and white part of the image, to calculate the standard deviation of the black part and calculate the mean of the white part, dividing the average in variance gives the SNR, is this calculation correct?
thank you.

Best Answer

It looks like you're going to assume the black part is "no signal" and that it's all noise. Actually if the noise goes above and below your signal, then you do have a signal in the dark part. Maybe you can just assume it's the mean. And you assume that the white part is signal plus the same amount of noise. Why don't calculate the stddev of both white and dark parts separately and see if they're the same? If it's additive, then it should be the same. Anyway, each pixel has an SNR. So you can calculate the mean divided by the stddev (not variance) for each pixel. You can average over all pixels in the light and dark regions if you want to get the average SNR in those regions. To average across white and black regions collectively doesn't really make sense.