MATLAB: How can i use wiener filter to remove this sinusoidal noise

digital image processingimage processing

im=imread('cgirl.jpg');
img=imresize(im,[256 256],'nearest');
imggray=rgb2gray(img);
figure
imshow(imggray);
title('original image');
[x, y] = meshgrid(1:256,1:256);
sinusoidalnoise = 15 * sin(2*pi/14*x+2*pi/14*y);
sinimage = double(imggray) + sinusoidalnoise;
figure
imshow(sinimage,[]);
title('Sinusoidal noise');
a_wnr=deconvwnr(sinimage,sinusoidalnoise,0);
figure
imshow(a_wnr)
title('restaorated image')
I use wiener filter to restaorate my image but something goes wrong, what shoul i do?
Can I restaorate image with wiener filter?
If I can't wthat filter can i use?

Best Answer

You have to think about what type of noise you have - that is is it additive random intensity with no correlation on pixel-to-pixel scales; is it multiplicative; does the noise have a coherent structure, that is is there a recurring noise-pattern that extend across pixels, is your noise due to motion-blur, or an out-of-focus camera?
After answering the above question (hint: it is the coherent "noise") you have to think about how to best remove that type of noise. For random uncorrelated noise you would use some variant of spatial averaging (linear 2D filter, median-filter, sigma-filter (wiener2 in matlab), bilateral filters etc. etc...). For a coherent pattern-noise you would want to estimate the pattern and then remove as much of that as possible, for the case of harmonic interference-type noise that would be done most easily with a notch-filter in the Fourier-domain. For motion-blur or out-of-focus you would try to deconvolve away those effects, with the deconvwnr, deconvlucy etc....
To give you a final hint:
imagesc(log10(abs(fft2(sinimage))))
There you should be able to identify your noise-components...
HTH
Related Question