Lecture#27
Lecture#27
Introduction to
Image Restoration
“To introduce the basic concept of Image
Restoration in Digital Image Processing”
Outlines
Estimation of Degradation
Model.
Restoration Techniques.
Lets start
Estimation of Degradation
Model.
Restoration Techniques.
What is Image Restoration.
What is Image Restoration?
Estimation of Degradation
Model.
Restoration Techniques.
Image enhancement vs. Image Restoration
Estimation of Degradation
Model.
Restoration Techniques.
Degradation Model?
and quality.
g(x,y)
Degradation ^
f(x,y) Restoration f(x,y)
Function h Filters
Degradation Restoration
ŋ(x,y)
Spatial Domain: g(x,y)=h(x,y)*f(x,y)+ ŋ(x,y)
Frequency Domain: G(u,v)=H(u,v)F(u,v)+ ŋ(u,v)
Matrix: G=HF+ŋ
Going On….!
Estimation of Degradation
Model.
Restoration Techniques.
Noise Models and Their PDF
Gaussian
Most common model
Rayleigh Erlang Exponential
Erlang or Gamma
Exponential
Uniform
Impulse Uniform Impulse
Salt and pepper noise
Noise Models Effects
Histogram to go here
Estimation of Degradation
Model.
Restoration Techniques.
Estimation of Degradation Model.
By Observation
By Experimentation.
Mathematical Modeling
gs(x,y) Gs(u,v)
Hs(u,v)= Gs(u,v)/ Fs(u,v)
fs(x,y) Fs(u,v)
Observation contd…
gs(x,y)
Gs(u,v)
Fs(u,v)
fs(x,y)
Experimentation
F(u,v)=>A (a constant).
G(u,v)=H(u,v)F(u,v).
H(u,v)=G(u,v)/A.
Note: The intensity of impulse is very high, otherwise noise can dominate to
impulse.
Mathematical Modeling
If you have the mathematical model, you have inside the degradation
process.
Estimation of Degradation
Model.
Restoration Techniques.
Restoration Techniques.
Inverse Filtering.
Weiner Filtering.
Mean filters
Adaptive filters
Arithmetic mean filter
Adaptive local noise reduction
Geometric mean filter filter.
Harmonic mean filter Adaptive median filter
Contra-harmonic mean filter
Median filter
Mid-point filter
alpha-trimmed filters
Filtering to Remove Noise-AMF
Arithmetic Mean :
ˆf ( x, y ) 1
g ( s, t )
mn ( s ,t )S xy
This is implemented as the simple smoothing filter Blurs the image to
remove noise.
1/ 1/ 1/
9 9 9
1/ 1/ 1/
9 9 9
1/ 1/ 1/
9 9 9
Filtering to Remove Noise-GMF
Geometric Mean:
1
mn
fˆ ( x, y ) g ( s, t )
( s ,t )S xy
Achieves similar smoothing to the arithmetic mean, but tends to lose less
image detail.
Filtering to Remove Noise-HMF
Harmonic Mean:
mn
fˆ ( x, y )
1
( s ,t )S xy g ( s, t )
Works well for salt noise, but fails for pepper noise
Contra-harmonic Mean:
g ( s, t )
( s ,t )S xy
Q 1
fˆ ( x, y )
g ( s ,
( s ,t )S xy
t ) Q
Q is the order of the filter and adjusting its value changes the filter’s
behaviour.
Fig: Original Image with Pepper noise Fig: After filter by 3*3 CHF, Q=1.5
Fig: Original Image with Salt noise Fig: After filter by 3*3 CHF, Q=-1.5
Beware: Q value in Contra-harmonic Filter
Choosing the wrong value for Q when using the contra-harmonic filter can
Spatial filters that are based on ordering the pixel values that make up
Median filter.
Midpoint filter.
Median Filter:
fˆ ( x, y) median{g ( s, t )}
( s ,t )S xy
Excellent at noise removal, without the smoothing effects that can occur
Max Filter:
fˆ ( x, y) max {g ( s, t )}
( s ,t )S xy
Min Filter:
fˆ ( x, y) min {g ( s, t )}
( s ,t )S xy
Max filter is good for pepper noise and min is good for salt noise
Midpoint Filter
Midpoint Filter:
1
fˆ ( x, y )
mn d
g ( s, t )
( s ,t )S xy
r
Here deleted the d/2 lowest and d/2 highest grey levels, so gr(s, t)
represents the remaining mn – d pixels
Result of Median Filter
Fig 1: Salt & Pepper noise Fig2: Result of 1 pass Med 3*3
Fig3: Result of 2 pass Med 3*3 Fig4: Result of 3 pass Med 3*3
Result of Max and Min Filter
Fig: Filtering Above,3*3 Max Filter Fig: Filtering Above,3*3 Min Filter
Periodic Noise
W
1 if D(u, v) D0 2
W W
H (u, v) 0 if D0 D(u, v) D0
2 2
1 if D(u, v) D0 W
2
Band Reject Filters contd..
The ideal band reject filter is shown below, along with Butterworth
Restore the original image from degraded image, if u have clue about
If you are able to estimate the H, then follow the inverse of degradation
process of an image.
• Nonlinear Processing
Thresholding, coring …
Iterative restoration
Estimation of Degradation
Model.
Restoration Techniques.
Conclusions-What we learnt…
Restore the original image from degraded image, if u have clue about
If you are able to estimate the H, then follow the inverse of degradation
process of an image.
CVIP tools
MATLAB
KHOROS
Applications of
Digital Image Processing?
Applications of Digital Image Processing
Identification.
Steganography.
Image Enhancement.