how to calculate signal to noise ratio for a particular section in an image automatically
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
seshi reddy
am 24 Jun. 2014
Kommentiert: seshi reddy
am 25 Jun. 2014
hi how to calculate signal to noise ratio for a particular section in an image automatically
9 Kommentare
Image Analyst
am 24 Jun. 2014
Bearbeitet: Image Analyst
am 24 Jun. 2014
I don't see a tank. A water tank? A military tank? Anyway, did you try the formula I gave you already a few comments ago? When I asked you "Can you estimate the noise from some area that is supposed to be uniform" and you replied "Yes", what value did you get? Or did you mean that Image Analyst can do it, but seshi can't?
Akzeptierte Antwort
Image Analyst
am 24 Jun. 2014
You can get a mask of the tank by thresholding at some value, like 40 or 100 or whatever works well
mask = oi < 40;
% Get the pixels in the mask in the oi image
signalPixels = oi(mask);
% Get the pixels in the mask in the noisy image.
noisePixels = A(mask);
% Get the mean SNR over all those pixels
% First get the SNR on a pixel by pixel basis, then take the mean.
snr = mean(signalPixels ./ noisePixels);
Of course you need to handle zero signal and zero noise cases.
5 Kommentare
Image Analyst
am 25 Jun. 2014
You can get rid of the nans. See the code below:
A = [1 2 5 6 7 8 nan 20 21 22 23 nan -2 -1 0 nan 1 2]
nanIndexes = isnan(A)
A(nanIndexes) = [] % Remove nans.
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!