English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

In a image compression and decompression function, I'm suppose to include the fucntion to calculate the SNR of the reconstructed image.

What command should I use to calculate the image SNR?

thanks alot

2007-07-23 01:56:46 · 1 answers · asked by Hornet One 7 in Science & Mathematics Engineering

1 answers

I've never dealt with calculation of noise in an image. ..I imagine that's because it's a very relative thing. In acoustic 'noise,' you can ..for example, have a noise source. Keep it off; measure the dB; turn on your source, and measure the dB again. The difference will be your Signal to Noise Ratio. And, so long as the background noise isn't so much that you can't discern the signal, the signal source will be a larger value than your background noise. But then, this is in dB scale ..which makes things a little hairy - dunno how it works in images.
..Image noise, ..at least, as I figure .. is much more subjective. I think what's generally percieved as noise is focused around the 'red' of RGB (keeping in mind that many colours are not attainable by RGB) ...that is, filter to red, ..take an area (gotta use the whole image, for your problem) ...find the average red value for the entire area (that is, compute the mean value of red), then find the standard deviation from that average, within the area. ..I suppose the average would be considered the "signal" ...and ..the SD would be the SNR?
..As far as use of matlab for this, sorry, it's been a while. When I was made to do something similar for this, an image was converted into a .mat file - this was essentially purely a numerical form. We were made to read the .mat file (with the 'load' command) and be able to extract the information ..such as being able organise arrays to hold the R, G, and B values for each pixel. Index through the arrays by finding the size for length and width of the picture; index through as if it were a table of values (...'cause ...it is, at this point).
Sorry I can only give you that conceptual hogwash - hope it at least stirs something that might help you - good luck.

2007-07-23 13:33:31 · answer #1 · answered by Winterbourne 2 · 2 0

fedest.com, questions and answers