How can i use wiener filter to remove this sinusoidal noise?

7 次查看(过去 30 天)
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?

采纳的回答

Bjorn Gustavsson
Bjorn Gustavsson 2019-6-18
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
  4 个评论
Bjorn Gustavsson
Bjorn Gustavsson 2019-6-19
编辑:Bjorn Gustavsson 2019-6-19
Half-right. If you can identify "peculiar" spikes (or generally strange features) in your 2D fft of the image then you most likely have coherent noise/interference noise, a good way to reduce that interference would then be to identify those fourier-components (manually with ginput or the like) and remove (set to zero) and then do a plain inverse fft. If you do this you should also remember that the fft of a real-valued signal is symmetric/antisymmetric and if you set one element of the fft to zero you should set its mirror-component to zero too (and recalling how matlab presents the fft and how the quadrants are shifted). Find yoursel a copy of the Gonzales and Woods (and Eddins) Digital Image Processing, it has a good section about this type of filtering.

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by