Digital Image Processing Lecture 11: Image Restoration March 30, 2005 Prof. Charlene Tsai
Jan 18, 2016
Digital Image Processing Lecture 11: Image Restoration
March 30, 2005
Digital Image Processing Lecture 11: Image Restoration
March 30, 2005
Prof. Charlene TsaiProf. Charlene Tsai
Digital Image Processing Lecture 11 2
ReviewReview
In last lecture, we discussed techniques that restore images in spatial domain. Mean filtering Order-statistics filering Adaptive filering Gaussian smoothing
We’ll discuss techniques that work in the frequency domain.
In last lecture, we discussed techniques that restore images in spatial domain. Mean filtering Order-statistics filering Adaptive filering Gaussian smoothing
We’ll discuss techniques that work in the frequency domain.
Digital Image Processing Lecture 11 3
Periodic Noise ReductionPeriodic Noise Reduction
We have discussed low-pass and high-pass frequency domain filters for image enhancement.
We’ll discuss 2 more filters for periodic noise reduction Bandreject Notch filter
We have discussed low-pass and high-pass frequency domain filters for image enhancement.
We’ll discuss 2 more filters for periodic noise reduction Bandreject Notch filter
Digital Image Processing Lecture 11 4
Bandreject FiltersBandreject Filters
Removing a band of frequencies about the origin of the Fourier transform. Ideal filter
where D(u,v) is the distance from the center, W is the width of the band, and D0 is the radial center.
Removing a band of frequencies about the origin of the Fourier transform. Ideal filter
where D(u,v) is the distance from the center, W is the width of the band, and D0 is the radial center.
2
WD, if 1
2,
2 if 0
2
, if 1
,
0
00
0
vuD
WDvuD
WD
WDvuD
vuH
Digital Image Processing Lecture 11 5
Bandreject Filters (con’d)Bandreject Filters (con’d)
Butterworth filter of order n
Gaussian filter
Butterworth filter of order n
Gaussian filter
n
DvuDWvuD
vuH 2
20
2 ,,
1
1,
220
2
,
,
2
1
1,
WvuD
DvuD
evuH
Digital Image Processing Lecture 11 6
Bandreject Filters: DemoBandreject Filters: Demo
Original corrupted by sinusoidal noise
Fourier transform
Butterworth filter
Result of filtering
Digital Image Processing Lecture 11 7
Notch FiltersNotch Filters
Reject in predefined neighborhoods about the center frequency.
Due to the symmetry of the Fourier transform, notch filters must appear in symmetric pairs about the origin.
Given 2 centers (u0, v0) and (-u0, -v0), we define D1(u,v) and D2(u,v) as
Reject in predefined neighborhoods about the center frequency.
Due to the symmetry of the Fourier transform, notch filters must appear in symmetric pairs about the origin.
Given 2 centers (u0, v0) and (-u0, -v0), we define D1(u,v) and D2(u,v) as
2120
201 22, vNvuMuvuD
2120
202 22, vNvuMuvuD
Digital Image Processing Lecture 11 8
Notch Filters: plotsNotch Filters: plots
ideal
Butterworth Gaussian
Digital Image Processing Lecture 11 9
Notch Filters (con’d)Notch Filters (con’d)
Ideal filter
Butterworth filter
Gaussian filter
Ideal filter
Butterworth filter
Gaussian filter
otherwise 1
,or , if 0, 0201 DvuDDvuDvuH
n
vuDvuDD
vuH
,,1
1,
21
20
20
22 ,,
2
1
1, D
vuDvuD
evuH
Digital Image Processing Lecture 11 10
How to deal with motion blur?How to deal with motion blur?
Original Blurred by motion
Digital Image Processing Lecture 11 11
Convolution Theory: ReviewConvolution Theory: Review
Knowing the degradation function H(u,v), we can, in theory, obtain the original image F(u,v).
In practice, H(u,v) is often unknow. We’ll discuss briefly one method of obtaining the
degradation functions. For interested readers, please consult Conzalez, section 5.6 for other methods.
Knowing the degradation function H(u,v), we can, in theory, obtain the original image F(u,v).
In practice, H(u,v) is often unknow. We’ll discuss briefly one method of obtaining the
degradation functions. For interested readers, please consult Conzalez, section 5.6 for other methods.
vuHvuFvuG ,,,
Filter (degradation function)
Original imageDegraded image
Digital Image Processing Lecture 11 12
Estimation of H(u,v) by Experimentation Estimation of H(u,v) by Experimentation
If equipment similar to the one used to acquire the degraded image is available, it is possible, in principle, to obtain the accurate estimate of H(u,v). Step1: reproduce the degraded image by varying the
system settings. Step2: obtain the impulse response of the
degradation by imaging an impulse (small dot of light) using the same system settings.
Step3: recalling that FT of an impulse is a constant (A)
If equipment similar to the one used to acquire the degraded image is available, it is possible, in principle, to obtain the accurate estimate of H(u,v). Step1: reproduce the degraded image by varying the
system settings. Step2: obtain the impulse response of the
degradation by imaging an impulse (small dot of light) using the same system settings.
Step3: recalling that FT of an impulse is a constant (A)
A
vuGvuH
,,
What we want
Degraded impulse image
Strength of the impulse
Digital Image Processing Lecture 11 13
Estimation of H(u,v) by Exp (con’d)Estimation of H(u,v) by Exp (con’d)
An impulse of light (magnified). The FT
is a constant A
G(u,v), the imaged (degraded) impulse
Digital Image Processing Lecture 11 14
Undoing the DegradationUndoing the Degradation
Knowing G & H, how to obtain F? Two methods:
Inverse filtering Wiener filtering
Knowing G & H, how to obtain F? Two methods:
Inverse filtering Wiener filtering
vuHvuFvuG ,,,
Filter (degradation function)
Original image (what we’re after)
Degraded image
Digital Image Processing Lecture 11 15
Inverse FilteringInverse Filtering
In the simplest form:
See any problems? Division by small values can produce very
large values that dominate the output.
In the simplest form:
See any problems? Division by small values can produce very
large values that dominate the output.
vuHvuG
vuF,
,,
Original
Inverse filtering using
Butterworth filter
Digital Image Processing Lecture 11 16
Inverse Filtering (con’d)Inverse Filtering (con’d)
Solutions? There are two similar approaches:
Low-pass filtering with filter L(u,v):
Thresholding (using only filter frequencies near the origin)
Solutions? There are two similar approaches:
Low-pass filtering with filter L(u,v):
Thresholding (using only filter frequencies near the origin)
vuLvuH
vuGvuF ,
,
,,
dvuHvuG
dvuHvuH
vuGvuF
, if ,
, if ,
,,
Digital Image Processing Lecture 11 17
Inverse Filtering: DemoInverse Filtering: Demo
Full filter d=40
d=70 d=80
Digital Image Processing Lecture 11 18
Inverse Filtering: Weaknesses Inverse Filtering: Weaknesses
Inverse filtering is not robust enough. It is even worse if the image has been
corrupted by noise.
The noise can completely dominate the output.
Inverse filtering is not robust enough. It is even worse if the image has been
corrupted by noise.
The noise can completely dominate the output.
vuNvuHvuFvuG ,,,,
vuH
vuNvuGvuF
,
,,,
Digital Image Processing Lecture 11 19
Wiener FilteringWiener Filtering
What measure can we use to say whether our restoration has done a good job?
Given the original image f and the restored version r, we would like r to be as close to f as possible.
One possible measure is the sum-squared-differences
Wiener filtering: minimum mean square error:
What measure can we use to say whether our restoration has done a good job?
Given the original image f and the restored version r, we would like r to be as close to f as possible.
One possible measure is the sum-squared-differences
Wiener filtering: minimum mean square error:
2,, jiji rf
vuG
KvuH
vuH
vuHvuF ,
,
,
,
1, 2
2
Specified constant
Digital Image Processing Lecture 11 20
Comparison of Inverse and Wiener Filtering Comparison of Inverse and Wiener Filtering
Column 1: blurred image with additive Gaussian noise of variances 650, 65 and 0.0065.
Column 2: Inverse filtering
Column 3: Wiener filtering
Column 1: blurred image with additive Gaussian noise of variances 650, 65 and 0.0065.
Column 2: Inverse filtering
Column 3: Wiener filtering
Digital Image Processing Lecture 11 21
SummarySummary
Removal of periodic noise: Bandreject Notch filter
Deblurring the image: Inverse filtering Wiener filtering
Removal of periodic noise: Bandreject Notch filter
Deblurring the image: Inverse filtering Wiener filtering