Here's how you can add Gaussian noise with mean m=0 and variance v=0.04 to an image using imnoise function in MATLAB:
main.m131 chars3 lines
To filter the added noise in the frequency domain using a low-pass filter, you can follow these steps:
fft2:main.m40 chars2 lines
fftshift:main.m50 chars2 lines
fspecial:main.m181 chars4 lines
main.m38 chars2 lines
ifftshift:main.m63 chars2 lines
ifft2:main.m58 chars2 lines
real:main.m63 chars2 lines
Here's the complete code:
main.m627 chars15 lines
gistlibby LogSnag