ImageProcessing8 Imagerestoration
ImageProcessing8 Imagerestoration
Image Restoration:
Noise Removal
50 49 51 50 52 53 58
51 51 52 52 56 57 60
48 50 51 49 53 59 63
49 51 52 55 58 64 67
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
10
of
31
Noise Example
The test pattern to the right is
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Histogram
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
31
11
Gaussian
Rayleigh
Erlang
Noise Example (cont…)
12
of
31
Noise Example (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Histogram to go here
50 49 51 50 52 53 58
51 204 52 52 0 57 60
48 50 51 49 53 59 63
49 51 52 55 58 64 67
50 49 51 50 52 53 58
51 204 52 52 0 57 60
48 50 51 49 53 59 63
49 51 52 55 58 64 67
50 49 51 50 52 53 58
51 204 52 52 0 57 60
48 50 51 49 53 59 63
49 51 52 55 58 64 67
50 54 57 60 63 67 70
51 55 59 62 65 69 72
Image f (x, y) Image f (x, y)
y y
20
of
31
Other Means (cont…)
Contraharmonic Mean:
g ( s, t )
( s ,t )S xy
Q 1
fˆ ( x, y )
g ( s ,
( s ,t )S xy
t ) Q
50 49 51 50 52 53 58
51 204 52 52 0 57 60
48 50 51 49 53 59 63
49 51 52 55 58 64 67
50 54 57 60 63 67 70
51 55 59 62 65 69 72
Image f (x, y) Image f (x, y)
y y
22
of
31
Noise Removal Examples
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image
Original Corrupted
Image By Gaussian
Noise
Image
Corrupted
By Pepper
Noise
Result of
Filtering Above
With 3*3
Contraharmonic
Q=1.5
24
of
31
Noise Removal Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image
Corrupted
By Salt
Noise
Result of
Filtering Above
With 3*3
Contraharmonic
Q=-1.5
25
of
31
Contraharmonic Filter: Here Be Dragons
50 49 51 50 52 53 58
51 204 52 52 0 57 60
48 50 51 49 53 59 63
49 51 52 55 58 64 67
50 54 57 60 63 67 70
51 55 59 62 65 69 72
Image f (x, y) Image f (x, y)
y y
29
of
31
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
50 49 51 50 52 53 58
51 204 52 52 0 57 60
48 50 51 49 53 59 63
49 51 52 55 58 64 67
50 54 57 60 63 67 70
51 55 59 62 65 69 72
Image f (x, y) Image f (x, y)
y y
31
of
31
Midpoint Filter
Midpoint Filter:
ˆf ( x, y ) 1 max {g ( s, t )} min {g ( s, t )}
2 ( s ,t )S xy ( s ,t )S xy
Good for random Gaussian and uniform
noise
32
of
31
Noise Corruption Example
50 49 51 50 52 53 58
51 204 52 52 0 57 60
48 50 51 49 53 59 63
49 51 52 55 58 64 67
50 54 57 60 63 67 70
51 55 59 62 65 69 72
Image f (x, y) Image f (x, y)
y y
33
of
31
Alpha-Trimmed Mean Filter
Alpha-Trimmed Mean Filter:
1
fˆ ( x, y )
mn d
g ( s, t )
( s ,t )S xy
r
50 49 51 50 52 53 58
51 204 52 52 0 57 60
48 50 51 49 53 59 63
49 51 52 55 58 64 67
50 54 57 60 63 67 70
51 55 59 62 65 69 72
Image f (x, y) Image f (x, y)
y y
35
of
31
Noise Removal Examples
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
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
36
of
31
Noise Removal Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
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
37
of
31
Noise Removal Examples (cont…)
Image Image Further
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
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
38
of
31
Periodic Noise
Typically arises due to
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
electrical or electromagnetic
interference
Gives rise to regular noise
patterns in an image
Frequency domain
techniques in the Fourier
domain are most effective
at removing periodic noise
39
of
31
Band Reject Filters
Removing periodic noise form an image
involves removing a particular range of
frequencies from that image
Band reject filters can be used for this purpose
An ideal band reject filter is given as follows:
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
40
of
31
Band Reject Filters (cont…)
The ideal band reject filter is shown below,
Images taken from Gonzalez & Woods, Digital Image Processing (2002)