Deblur image using regularized filter
J = deconvreg(I, PSF)
J = deconvreg(I, PSF, NOISEPOWER)
J = deconvreg(I, PSF, NOISEPOWER, LRANGE)
J = deconvreg(I, PSF, NOISEPOWER, LRANGE, REGOP)
[J, LAGRA] = deconvreg(I, PSF,...)
J = deconvreg(I, PSF) deconvolves
I using the regularized filter algorithm,
returning deblurred image J. The assumption is that the image
created by convolving a true image with a point-spread function PSF
and possibly by adding noise. The algorithm is a constrained optimum
in the sense of least square error between the estimated and the true
images under requirement of preserving image smoothness.
I can be a N-dimensional array.
J = deconvreg(I, PSF, NOISEPOWER) where
the additive noise power. The default value is 0.
J = deconvreg(I, PSF, NOISEPOWER, LRANGE) where
a vector specifying range where the search for the optimal solution
is performed. The algorithm finds an optimal Lagrange multiplier
LRANGE range. If
a scalar, the algorithm assumes that
LAGRA is given
and equal to
is then ignored. The default range is between [1e-9 and 1e9].
J = deconvreg(I, PSF, NOISEPOWER, LRANGE,
REGOP is the regularization
operator to constrain the deconvolution. The default regularization
operator is the Laplacian operator, to retain the image smoothness.
REGOP array dimensions must not exceed the
image dimensions; any nonsingleton dimensions must correspond to the
nonsingleton dimensions of
[J, LAGRA] = deconvreg(I, PSF,...) outputs
the value of the Lagrange multiplier
LAGRA in addition
to the restored image
The output image
I can be of class
double. Other inputs have to be of class
the same class as
Create sample image.
I = checkerboard(8);
Create PSF and use it to create a blurred and noisy version of the input image.
PSF = fspecial('gaussian',7,10); V = .01; BlurredNoisy = imnoise(imfilter(I,PSF),'gaussian',0,V); NOISEPOWER = V*prod(size(I));
Deblur the image.
[J LAGRA] = deconvreg(BlurredNoisy,PSF,NOISEPOWER);
Display the various versions of the image.
subplot(221); imshow(BlurredNoisy); title('A = Blurred and Noisy'); subplot(222); imshow(J); title('[J LAGRA] = deconvreg(A,PSF,NP)'); subplot(223); imshow(deconvreg(BlurredNoisy,PSF,,LAGRA/10)); title('deconvreg(A,PSF,,0.1*LAGRA)'); subplot(224); imshow(deconvreg(BlurredNoisy,PSF,,LAGRA*10)); title('deconvreg(A,PSF,,10*LAGRA)');