To add Gaussian noise with parameters m=0, v=0.04 to an image in MATLAB, you can use the imnoise function as follows:
main.m77 chars3 lines
This will add Gaussian noise with mean m=0 and variance v=0.04 to the image.
To visualize the added noise in frequency space, you can take the Fourier Transform of the original and noisy image using fft2, and then visualize the resulting magnitude spectra using mat2gray and imshow functions.
main.m271 chars9 lines
To filter the noise in frequency space using a low pass filter, you can create a filter using fspecial function in MATLAB and then apply it to the noisy image frequency domain. For example, to apply a Gaussian filter with standard deviation of 5 pixels, you can use the following code:
main.m191 chars5 lines
Now, you can visualize the filtered image and its frequency spectrum as above using mat2gray and imshow functions.
gistlibby LogSnag