Lect 10
Lect 10
Lecture # 10
Image Restoration
1
WHAT IS IMAGE RESTORATION?
• The purpose of image restoration is to restore a
degraded/distorted image to its original content and quality
• Restoration attempts to reconstruct or recover an image that
has been degraded by using a priori knowledge of the
degradation phenomenon
• Restoration techniques are oriented toward modeling the
degradation and applying the inverse process in order to
recover the original image
• Image enhancement is largely a subjective process, while
image restoration is for the most part an objective process
2
WHAT IS IMAGE RESTORATION?
3
WHAT IS IMAGE RESTORATION?
• Image restoration attempts to restore
images that have been degraded
– Identify the degradation process and attempt
to reverse it
– Similar to image enhancement, but more
objective
4
Noise and Images
The sources of noise in digital
images arise during image
acquisition (digitization) and
transmission
– Imaging sensors can be affected
by ambient conditions
– Interference can be added
to an image during transmission
Noise Model
We can consider a noisy image to be modelled as
follows:
g ( x, y) f ( x, y ) ( x, y)
where f(x, y) is the original image pixel, η(x, y) is the
noise term and g(x, y) is the resulting noisy pixel
If we can estimate the model the noise in an image is
based on this will help us to figure out how to restore
the image
Noise Models
There are many different Gaussian Rayleigh
models for the image
noise term η(x, y):
– Gaussian
• Most common model Erlang Exponential
– Rayleigh
– Erlang
– Exponential
Uniform
– Uniform Impulse
– Impulse
• Salt and pepper noise
Noise Example
The test pattern to the right is
ideal for demonstrating the
addition of noise
The following slides will show the
result of adding noise based on Image
various models to this image
Histogram to go here
Histogram
Noise Example (cont…)
Histogram to go here
Image
Original Corrupted
Image By Gaussian
Noise
d (r, c)
1
N2
Geometric Mean =
( r ,c )w
N2
Harmonic Mean = 1
( r ,c )w d ( r, c )
Contra-Harmonic Mean =
d ( r , c)
( r ,c )w
R
5 5 6 7 8 8
5 6 7 8 replicate 5 5 6 7 8 8 median 5 6 7 8
0 6 7 8 -padding 0 0 6 7 8 8 filtering 5 6 7 8
5 6 15 8 5 5 6 15 8 8 5 6 7 8
5 6 7 8 5 5 6 7 8 8 5 6 7 8
5 5 6 7 8 8
impulse cleaned!
Median Filtering
26
Noise Removal Examples
Image Result of 1
Corrupted Pass With A
By Salt And 3*3 Median
Pepper Noise Filter
Result of 2 Result of 3
Passes With Passes With
A 3*3 Median A 3*3 Median
Filter Filter
Max and Min Filter
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
Image Image
Corrupted Corrupted
By Pepper By Salt
Noise Noise
Result Of Result Of
Filtering Filtering
Above Above
With A 3*3 With A 3*3
Max Filter Min Filter
Alpha-Trimmed Mean Filter
Alpha-Trimmed Mean Filter:
1
fˆ ( x, y) g r ( s, t )
mn d ( s ,t )S xy
Alpha-Trimmed Mean Filter
• Alpha-Trimmed Mean Filter:
1
fˆ ( x, y) g r ( s, t )
mn d ( s ,t )S xy
• We can delete the d/2 lowest and d/2 highest grey levels
• So gr(s, t) represents the remaining mn – d pixels
• If d =0, the filter is reduced to arithmetic mean
• If d= mn – 1, the filter become median filter
• For other values, the filter is useful in situation involving
multiple types of noise
– Combination of salt-and-pepper and Gaussian noise
Noise Removal Examples (cont…)
Image Image Further
Corrupted Corrupted
By Uniform By Salt and
Noise Pepper Noise
Filtered By Filtered By
5*5 Arithmetic 5*5 Geometric
Mean Filter Mean Filter
Filtered By Filtered By
5*5 Median 5*5 Alpha-Trimmed
Filter Mean Filter
Order Filters
• Order filters can also be defined to select a
specific pixel rank within the ordered set.
– For example, we may find the second highest
value is the better choice than the maximum value
for certain pepper noise.
– This type of ordered selection is application
specific.
• Minimum filter tend to darken the image and
maximum filter tend to brighten the image.
Order Filters
• Midpoint filter:
– Average of the maximum and minimum within the
window.
– Useful for removing gaussian and uniform noise.
I1 I N 2
Midpoint =
2
Order Filters
• Reading Assignment
• Adaptive Filters
• Adaptive Median Filtering
Acknowledgements
Digital Image Processing”, Rafael C. Gonzalez & Richard E. Woods, Addison-Wesley, 2002
Peters, Richard Alan, II, Lectures on Image Processing, Vanderbilt University, Nashville, TN, April
Material in these slides has been taken from, the following resources
2008
Brian Mac Namee, Digitial Image Processing, School of Computing, Dublin Institute of Technology
Computer Vision for Computer Graphics, Mark Borg
37