First time here? Check out the FAQ!

Ask Your Question
3

additive Gaussian noise with different SNR

asked Jul 22 '14

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?

Preview: (hide)

1 answer

Sort by » oldest newest most voted
5

answered Jul 23 '14

berak gravatar image

updated Jul 23 '14

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);
imshow("add",im + noise);
waitKey();

image description

Preview: (hide)

Comments

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. :)

StevenPuttemans gravatar imageStevenPuttemans (Jul 23 '14)edit

Question Tools

Stats

Asked: Jul 22 '14

Seen: 3,713 times

Last updated: Jul 23 '14