Adhil
Adhil

Reputation: 1858

Image deblurring using the Wiener deconvolution

I am trying to deblur the following image by Wiener deconvolution. I was not given the original PSF, and I came up with an arbitrary value for the noise figure. I tried to optimize the code by playing around with the sigma values but I cannot get it to work.

my code...

img = im2double(imread('C:\Users\adhil\Desktop\matlab pics\test.JPG'));
LEN = 2;
THETA = 5;
PSF = fspecial('gaussian', LEN, THETA);
wnr1 = deconvwnr(img, PSF, 0.0000001);
imshow(wnr1);
title('Restored Image');

subplot(1,2,1);imshow(img);title('Before');
subplot(1,2,2);imshow(wnr1);title('After');

here is the result...

enter image description here

please advise

Upvotes: 1

Views: 572

Answers (1)

paisanco
paisanco

Reputation: 4154

If you have no idea what the point spread function is, or you try an approximation that is far from the actual point spread function, Wiener deconvolution won't work very well, because it relies on knowing the point spread function.

You might have better results trying blind deconvolution (Matlab function):

deconvblind

using an array of ones the same size as your Gaussian PSF guess as the initial PSF (using the array of ones is suggested by the Matlab documentation).

Upvotes: 1

Related Questions