Digital Image Processing - Image Restoration
Digital Image Processing - Image Restoration
10/25/2022 Le Thanh Ha 2
-Image degradation/restoration process
-Noise models
-Periodic Noise
-Estimation of Noise Parameters
DEGRADATION MODELING
10/25/2022 Le Thanh Ha 3
Image degradation/restoration process
g ( x, y) = h( x, y) f ( x, y) + ( x, y)
10/25/2022 Le Thanh Ha 4
Noise models
• The performance of imaging sensors is affected by a variety of
factors:
– Environmental conditions: background light levels
– Sensor temperature
– Electricity noise
–…
• Need a noise model capable for a specific type of imaging
devices
10/25/2022 Le Thanh Ha 5
Gaussian noise
• Gaussian noise arises in an image due to
factors such as electronic circuit and sensor
noise due to low illumination or high
temperature
1 −( z − z ) 2
p( z ) = e
2 2 2
10/25/2022 Le Thanh Ha 6
Rayleigh noise
• Reyleigh density is helpful in characterizing
noise in range imaging (depth sensing)
2 − ( z − a )2 / b
( z − a )e for z a
p( z ) = b
0 for z a
10/25/2022 Le Thanh Ha 7
Impulse noise
• Known as Salt-and-pepper noise and found in
situations where quick transients take place
when imaging (Faulty switching)
Pa for z = a
p( z ) = Pb for z = b
0
otherwise
10/25/2022 Le Thanh Ha 8
Exponential and Gamma noise
➢Finds their applications in laser imaging
ab z b −1 − az
e for z 0 e − az for z 0
p( z ) = (b − 1)! p( z ) =
0 0 for z 0
for z 0
10/25/2022 Le Thanh Ha 9
Uniform noise
• Used for computer simulation noise
1
if a z b
p( z ) = b − a
0 otherwise
10/25/2022 Le Thanh Ha 10
10/25/2022 Le Thanh Ha 11
Test pattern
10/25/2022 Le Thanh Ha 12
10/25/2022 Le Thanh Ha 13
10/25/2022 Le Thanh Ha 14
Periodic noise
• Arises typically from electrical or electromechanical
interference during image acquisition
10/25/2022 Le Thanh Ha 15
Estimation of Noise Parameters
• Simple periodic noise parameters can be
visually estimated in Fourier domain.
• Other types of noise can be estimated in
spatial domain at smooth regions.
10/25/2022 Le Thanh Ha 16
-Mean filters
-Order statistic filters
-Adaptive filters
IMAGE RESTORATION
10/25/2022 Le Thanh Ha 17
Mean filters
• Arithmetic mean filter
• Geometric mean filter
• Harmonic mean filter
• Contrahamonic mean filter
10/25/2022 Le Thanh Ha 18
Arithmetic mean filter
• Smooths local variations in an images and
noise is reduced as a result of blurring
ˆf ( x, y ) = 1
mn ( s ,t )S xy
g ( s, t )
10/25/2022 Le Thanh Ha 19
Geometric mean filter
• Achieve smoothing comparable to the
arithmetic mean filter but lose less image
detail
1
mn
fˆ ( x, y ) = g ( s, t )
( s ,t )S xy
10/25/2022 Le Thanh Ha 20
Harmonic mean filter
• Works well for salt noise but fails for pepper
noise. It also does well with Gaussian noise.
mn
fˆ ( x, y ) =
1
( s ,t )S xy g ( s, t )
10/25/2022 Le Thanh Ha 21
Contraharmonic mean filter
( s ,t )S xy
g ( s, t )Q +1
fˆ ( x, y ) =
( s ,t )S xy
g ( s, t )Q
10/25/2022 Le Thanh Ha 22
10/25/2022 Le Thanh Ha 23
10/25/2022 Le Thanh Ha 24
Order-Statistic Filters
• Median filter
• Max and min filters
• Midpoint filter
• Alpha-trimmed mean filter
10/25/2022 Le Thanh Ha 25
Median filter
• Excellent noise-reduction capability with
considerably less blurring
fˆ ( x, y ) = median{g ( s, t )}
( s ,t )S xy
10/25/2022 Le Thanh Ha 26
10/25/2022 Le Thanh Ha 27
Max and min filters
Max filter is useful for finding brightest points in an image
therefore for removing low values like pepper noise
fˆ ( x, y ) = max{g ( s, t )}
( s ,t )S xy
fˆ ( x, y ) = min{g ( s, t )}
( s ,t )S xy
10/25/2022 Le Thanh Ha 28
10/25/2022 Le Thanh Ha 29
Midpoint filter
• Combines order statistics and averaging and
works best for Gaussian or uniform noise
10/25/2022 Le Thanh Ha 30
Alpha-trimmed mean filter
1
fˆ ( x, y ) =
mn − d
( s ,t )S xy
g r ( s, t )
10/25/2022 Le Thanh Ha 32
Adaptive local noise reduction filter
2 is the variance of the noise
2
fˆ ( x, y ) = g ( x, y ) − 2 g ( x, y ) − mL
L L2 is the variance of pixels in Sxy
mL is the local mean of pixels in Sxy
• If = 0 : no noise, filter returns g(x,y)
2
State A: State B:
A1 = zmed - zmin B1 = zxy – zmin
A2 = zmed – zmax B2 = zxy – zmax
if A1>0 and A2<0, goto state B If B1>0 and B2<0, output zxy
Else increase the window size Else output zmed
if window size Smax repeat state A
Else output zmed
10/25/2022 Le Thanh Ha 35
Adaptive median filter
• Statistically consider zmin and zmax are “impulse-like”
components.
• State A determines if zmed is an impulse or not
– If YES is an impulse increase neighbor window Sxy and repeat.
– If NO, go to state B.
• State B determines if center pixel zxy is an impulse or not
– If YES, return zmed
– If NO, return zxy
10/25/2022 Le Thanh Ha 36
10/25/2022 Le Thanh Ha 37
-Bandreject filters
-Notch filters
10/25/2022 Le Thanh Ha 38
Bandreject filters
W
1 if D (u , v ) D −
• Ideal bandreject filter
W
0
2
W
H (u, v) = 0 if D0 − D(u, v) D0 −
2 2
W
1 if D (u , v ) D0 +
2
10/25/2022 Le Thanh Ha 40
10/25/2022 Le Thanh Ha 41
Notch filter
• A notch filter reject frequencies in predefined neighborhoods
about a center frequency.
10/25/2022 Le Thanh Ha 42
- Linear, Position-invariant Degradations
- Estimating the degradation function
- Inverse Filtering
- Different approaches
DEGRADATION ESTIMATION
10/25/2022 Le Thanh Ha 43
Linear, position-invariant Degradation
• The linear, position-invariant Degradation can be written in
convolution term:
g ( x, y ) = h( x, y )* f ( x, y ) + ( x, y )
G (u, v) = H (u, v) F (u, v) + N (u, v)
46
Estimation by modeling
• Atmospheric turbulence
H (u , v) = e − k ( u + v 2 )5 / 6
2
− k ( u 2 + v 2 )5 / 6
H (u , v) = e
47
Estimation by modeling
• Linear motion blurring
• Degradation model
g ( x, y ) = f ( x, y ) h ( x, y ) + ( x, y )
G (u, v) = F (u, v) H (u, v) + N (u, v)
• Inverse filter
ˆ G (u , v) N (u , v)
F (u , v) = +
H (u , v) H (u, v)
N (u , v)
= F (u, v) +
H (u , v)
49