experiment 7: image restoration filters (using matlab) by...
TRANSCRIPT
Experiment 7: Image restoration filters (using MATLAB)
By: Dr. Rajeev Srivastava
This experiment demonstrates following image restoration filters and their comparative
study:
1. Blind Deconvolution algorithm
2. Lucy-Richardson algorithm
3. Regularized filter
4. Weiner filter
1. Blind Deconvolution algorithm
It is a deconvolution technique that permits recovery of the target scene from a set of ‘blurred
image’ in the presence of a point spread function.It can be performed iteratively, whereby
each iteration improves the estimation of the PSF and the scene, or non-iteratively, where one
application of the algorithm, based on exterior information, extracts the PSF.
Deblurring image using this algorithm includes
Reading an image
Simulate the blur by using convolving a Gaussian filter with the true image (using
imfilter). The Gaussian filter then represents a point-spread function, PSF.
Restoring the blurred image using PSF of various size. UNDERSIZED PSF
is the array with shorter pixel level,OVERPSF is the array with longer
pixel level,INITPSF for an initial PSF that is exactly of the same size as the true
PSF.
To determine different PSF padarray function is used.
Padarray(A,padsize,padval,direction)
A is the matrix to b padded
padsize :specifies both direction of padding and direction along which to pad.
padval : circular->circular repetition of element with in the dimension
Replicate->pad by repetition of border element of array.
Symmetric->pad with mirror refection of it.
Direction: character string specifies direction to apply. The specified directions are:
Both: pad before 1st element n after last element along each direction.
Pre: pad before last array element along each direction.
Post: pad after last array element along each direction.
deconvblind function :
[J,PSF] = deconvblind(I, INITPSF,NUMIT)deconvolves image I using the maximum
likelihood algorithm, returning both the deblurred image J and a restored point-spread
function PSF.NUMIT is the no of iteration, default is 10.
Analyzing the Restored PSF.
Improving the restoration
Original Image Blurred Image
Restored Using Initial PSF
Fig: Restoration Using Blind Deconvolution Algorithm
2. Lucy-Richardson algorithm
It is an iterative procedure for recovering a latent image that has been blurred by a point
spread function. The algorithm maximizes the likelihood that the resulting image when
convolved with the PSF is an instance of the blurred image, assuming poisons noise statistics.
Maximizing the likelihood function of the model yields an equation that is satisfied when the
following iteration converges.
= ( )
original image
blurred image
deblurring with initial psf
‘*’ is the convolution, is the estimate of the undegraded image is the degraded
output image and is the spatial representation of the degraded function.
The approach followed is stopped when a result acceptable in a given application has been
obtained.
deconvlucy(I,psf,nummit) : restore image that was degraded by convolution with point
spread function and an additive noise. Here numit is the no of iteration. Default is 10.
Original Image Blurred Image
Blurred & Noisy Image Restored Using 7 iteration
original Image Blurred
Blurred & Noisy Restored image, iteration=7
Restored using 10 iteration Restoration Using 20 Iteration
Fig: Restoration Using Lucy-Richardson Algorithm
3. Regularized filter
It is used effectively when limited information is known about the adiitive noise.
deconvreg() : deconvolves image i using above algorithm returning deblurred image
syntax: [reg1 lagra]=deconvreg(I,psf,NP, parameter) where is the NP is the additive noise
power. reg1 is the restored image and lagra is a scalar,Lagrange multiplier. Over-estimated
NP leads to poor resolution. Under-estimated NP leads to overwhelming noise.
edgetaper(): blurs the edges of input image i using psf.reduce noise amplification and ringing
algorithm d boundary.
syntax: edgetaper(I,psf)
Original Image Blurred Image
Restored image with damping,interation=10
original imageBlurred
Edgetar Effect Blurred & Noisy
Restored with Noise Power Restored with Langrange Multiplier
Fig: Restoration Using Regularized Filter
4. Weiner filter: It is one of the best approaches to linear image restoration. It seeks an
estimate that minimizes the statistical error function
} where the expected value operator and is is the undegraded image.
The solution to above expression in the frequency domain is:
| |
| |
Where the degradation function.
| | =
=the complex conjugate of
| | = the power spectrum of noise
| | = power spectrum of undegraded image
⁄ signal to noise power
Edgetaper effect Blurred & noisy
restored with nprestored with lagrange multiplier
deconvwnr(I,psf,NSR) : deconvolves image I using weiner filter algorithm. NSR is the noise
to signal ration.
Original Image Blurred Image
Restored Image Simulate Blur & Noise
Restored blurred & noisy image Restored image using estimated SNR
Fig: Restoration Using Wiener Filter
Original Image Blurred Image
Restored ImageSimulate Blur & Noise
Restored blurred & noisy imageRestored blurred,noisy image using estimated snr
5. PERFORMANCE ANALYSIS OF DIFFERENT DEBLURRING ALGORITHM
(on example image)
Algorithm MSE RMS PSNR NMSE
Blind Deconvolution
Algorithm
Parameters:-
1. Symmetric
2. Replicate
3. Circular
2.5588e+004
9.2978e+003
7.6797e+003
159.9638
96.4252
87.6341
4.0504
8.4470
9.2773
6.4137e-009
2.3305e-009
1.9249e-009
Lucy-Richardson
Algorithm
Parameters:- Variance=.005,
Iteration=10
1. Symmetric
2. Replicate
3. Circular
4.2047e+004
4.1654e+004
4.0578e+004
205.0525
204.0929
201.4387
1.8935
1.9342
2.0479
1.0539e-008
1.0440e-008
1.0171e-008
Variance=.002,
Iteration=15
1. Symmetric
1. Replicate
2. Circular
1.5623e+004
1.4840e+004
1.4600e+004
124.9988
121.8214
120.8286
6.1924
6.4163
6.4874
3.3938e-008
3.2589e-008
3.2060e-008
Regularized Filter
Parameters:-
1. Symmetric
2. Replicate
3. Circular
6.7710e+004
6.5248e+004
7.8193e+004
260.2120
255.4378
279.6308
-0.1757
-0.0149
-0.8009
1.4068e-007
1.3556e-007
1.6246e-007
Wiener Filter
Parameters:-
Length=11
Theta=21
Noise variance=.0001
1. Symmetric
2. Replicate
3. Circular
0.0719
0.0253
0.0127
0.2682
0.1590
0.1127
59.5623
64.1025
67.0910
1.1722e-009
4.1208e-010
2.0707e-010
Noise variance=.002
1. Symmetric
2. Replicate
3. Circular
Noise variance=.02
1. Symmetric
2. Replicate
3. Circular
0.1569
0.1555
0.1512
9.0806
9.0892
9.0863
0.3962
0.3943
0.3888
3.0134
3.0148
3.0144
56.1735
56.2143
56.3352
38.5496
38.5456
38.5469
2.5578e-009
2.5339e-009
2.4644e-009
1.4800e-007
1.4814e-007
1.4809e-007