Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Applying Wiener filter to remove noise using python

This is the what my input image looks like

And this is what my wiener filtered output should look like

The first image is my input image. The second image is a wiener filtered image, which is my output.

Below is the code to use wiener filter on my image. The input image is "img5" and the output image is "Wiener_filtered".

psf = np.ones((5,5)) / 25
img6 = convolve2d(img5,psf,'same')
img6 += 0.1 * img6.std() * np.random.standard_normal(img6.shape)
Wiener_filtered = restoration.wiener(img6,psf,1100) 

Below I have attached the input image "img5" and the outcomes of "img6" and "Wiener_filtered"

Input image img5

Input image "img5"

img6

Outcome of "img6"

Wiener_filtered

The final wiener filtered image

I need help in finding out where i went wrong. I am new to image processing. Can someone show me the correct method.

like image 693
Shashank Jerri Avatar asked Sep 03 '25 09:09

Shashank Jerri


1 Answers

You may want to check out similar questions at SOF to get a better practical understanding of you to use the algorithm, e.g:

Wiener Filter for image deblur

For improving your basic understanding of denoising, there are helpful tutorials availably for scipy and scikit-image, e.g.:

http://www.scipy-lectures.org/advanced/image_processing/#denoising

like image 150
tfv Avatar answered Sep 04 '25 22:09

tfv