フィルターのクリア

Signal to Noise Ratio (SNR)

27 ビュー (過去 30 日間)
Toqeer Mahmood
Toqeer Mahmood 2015 年 10 月 12 日
コメント済み: Mahmoud Yassin 2022 年 11 月 16 日
Hi everone!
I wanted to add gaussian noise to an image. I used the command like noisy=imnoise (image, 'gaussian', 0, 0.05), it makes the image so noisy. In different Journal papers different researchers are claiming that they are adding gaussian noise with the power such as 20dB, 25dB etc. moreover their reported images are also in good quality. I am unable to solve this mystery, as this command gives some floating type result but not as a whole number. I am also attaching the published papers. Please anyone have a look on them and reply, Thanks.

採用された回答

Thorsten
Thorsten 2015 年 10 月 12 日
編集済み: Thorsten 2015 年 10 月 12 日
20dB, 25dB is not the power of the noise, but the signal to noise ratio (SNR) in decibel.
It is computed as SNRdb = 10*log10(sigma_signal^2/sigma_noise^2); For imnoise you provide the variance of the noise, i.e., sigma_noise^2. You have to transform the above equation to determine sigma_noise for the desired SNRdB and the sigma_signal of your image.
This little demo creates noise of different SNR using either randn or imnoise; both give same results.
I = im2double(imread(('lena'));
varI = std2(I)^2;
SNRdB = 5:5:30;
for i=1:numel(SNRdB)
sigma_noise = sqrt(varI/10^(SNRdB(i)/10));
N = sigma_noise*randn(size(I));
IN1 = I+N; % using randn
IN2 = imnoise(I, 'Gaussian', 0, sigma_noise^2); % using imnoise
imshow([IN1 IN2])
title(['SNR = ' int2str(SNRdB(i)) 'dB' ...
', \sigma_{noise} = ' num2str(sigma_noise)]);
disp('Press any key to proceed')
pause
end
  3 件のコメント
AMIR KHAN
AMIR KHAN 2021 年 8 月 27 日
Very Helpful
Mahmoud Yassin
Mahmoud Yassin 2022 年 11 月 16 日
Very helpful, thanks a lot

サインインしてコメントする。

その他の回答 (1 件)

Toqeer Mahmood
Toqeer Mahmood 2015 年 10 月 12 日
Thanks Thorsten for you kind reply and help.
  1 件のコメント
Thorsten
Thorsten 2015 年 10 月 12 日
Toqeer, please be so kind to formally "Accept" my answer.

サインインしてコメントする。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by