필터 지우기
필터 지우기

how to calculate actual snr of image in matlab?

조회 수: 106 (최근 30일)
vipul utsav
vipul utsav 2012년 12월 4일
댓글: Alan Keenan 2021년 9월 20일
how to calculate actual snr of image in matlab?

채택된 답변

Image Analyst
Image Analyst 2012년 12월 4일
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.
  댓글 수: 12
Image Analyst
Image Analyst 2012년 12월 5일
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.
vipul utsav
vipul utsav 2012년 12월 5일
thanks for your valuable guidance

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Dhurgham Al-karawi
Dhurgham Al-karawi 2017년 8월 29일
편집: Image Analyst 2017년 8월 29일
Hi,
Here you are.
img=imread('.JPG');
img=double(img(:));
ima=max(img(:));
imi=min(img(:));
ims=std(img(:));
snr=10*log((ima-imi)./ims);
  댓글 수: 4
Image Analyst
Image Analyst 2019년 10월 17일
A signal to noise ratio requires both a signal, and noise. If you don't have each of those, you can't do it. However there are single image quality metrics. Try this link.
Alan Keenan
Alan Keenan 2021년 9월 20일
Perform a histogram on your image and then decide at what level you consider to be signal, i.e., above a value is signal and below that value is noise. If your image is in dB then you might use -6dB as the threshold value. In my case my max signal value is always 0dB as it has been normalised to the max value and converted to dB. So you can say anything less than -6dB is noise and anything greater than -6dB is signal. An easy way to calculate the noise floor is rms(rms(image));. This means that if your signal has a max value of 0dB then the peak SNR for your signal = 0dB + the value of the rms calculation.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by