The objective is to add additive gaussian noise of zero mean and variance of 400 to an image.
For example, if i wanted to add additive gaussian noise of zero mean and variance 0.5, i can use one of the two following methods:
1) The imnoise command in Matlab:
Noisyimg=imnoise(I,'gaussian',0,0.5)
where I is the image to which the noise is being added and Noisyimg is the noisy image.
2) Create a matrix of random numbers taken from the normal distribution with the mean and standard deviation specified, by using the randn command.
noisemat= a*randn(size(I))+ b; where a=standard deviation and b=mean
Noisyimg=noisemat+I;
Thus,for zero mean and a variance of 0.5,
noisemat=sqrt(0.5)*randn(size(I))+0;
since standard deviation is square root of variance.
But, when i try to apply the above two methods to obtain a noisy image with a additive gaussian noise of zero mean and a variance of 400, am ending up with indiscernible images. For eg, using method two,
noisemat=sqrt(400)*randn(size(I))+0;
Noisyimg=noisemat+I;
The resultant noisy image is nowhere near the actual noisy image that i should be obtaining.This, am aware, because i have the picture of the actual noisy output that i should be obtaining. Am i making any mistake in implementing the commands or am i missing some critical points.
I have attached the original image to which i was trying to add the gaussian noise and the image that was obtained after the addition of noise.
original image(I)
Noisyimg
Any help would be greatly appreciated!!