Ask Your Question
3

additive Gaussian noise with different SNR

asked 2014-07-22 16:21:49 -0600

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 flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
5

answered 2014-07-23 01:19:09 -0600

berak gravatar image

updated 2014-07-23 01:34:09 -0600

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

edit flag offensive delete link more

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 ( 2014-07-23 03:40:49 -0600 )edit

Question Tools

Stats

Asked: 2014-07-22 16:21:49 -0600

Seen: 3,660 times

Last updated: Jul 23 '14