# additive Gaussian noise with different SNR

I am reading a paper. It says like this:

"For experiments conducted on noisy images, each texture image was corrupted by additive Gaussian noise with zero mean and standard deviation that was determined according to the corresponding Signal-to-Noise Ratios (SNR) value."

And then, they show the classification rate (%) on UIUC database with additive gaussian nosie of different Signal-To-Noise Rations (SNR):(SNR=100 SNR=30 SNR=15 SNR=10 SNR=5)

So I want to do the same....

Is GaussianBlur my function? How do I determine the SNR?

edit retag close merge delete

Sort by » oldest newest most voted

first of all, GaussianBlur is the wrong one, (it reduces noise by interpolating).

also i'd guess, that you don't 'calculate' the SNR, but set it to a couple of fixed values, like: we'going to test with 10%, 20%, 50%, 80% noise.

you could do this with cv::randn(), and 'a' would be 0, and 'b' would be the std-dev calculated according to the desired SNR. ( for a SNR of 90 (10% noise), you want 255 * 10/100 for b.)

let's just try it on lena:

Mat im = imread("lena.jpg", 0);
Mat noise = Mat(im.size(), CV_8U);
Scalar a(0);
Scalar b(20) ;
randn(noise,a,b);
imshow("noise",noise);
waitKey(); more

1

Just to add, people mix up adding noise and blur all the time, whilst the reason of using Gaussion blur is mainly for removing unwanted noise elements. :)

Official site

GitHub

Wiki

Documentation