chapter5-2 restoration and depredations.ppt

Iftikhar70 30 views 108 slides May 06, 2024
Slide 1
Slide 1 of 108
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77
Slide 78
78
Slide 79
79
Slide 80
80
Slide 81
81
Slide 82
82
Slide 83
83
Slide 84
84
Slide 85
85
Slide 86
86
Slide 87
87
Slide 88
88
Slide 89
89
Slide 90
90
Slide 91
91
Slide 92
92
Slide 93
93
Slide 94
94
Slide 95
95
Slide 96
96
Slide 97
97
Slide 98
98
Slide 99
99
Slide 100
100
Slide 101
101
Slide 102
102
Slide 103
103
Slide 104
104
Slide 105
105
Slide 106
106
Slide 107
107
Slide 108
108

About This Presentation

Image processing


Slide Content

Digital Image Processing
Chapter 5: Image Restoration

A Model of the Image
Degradation/Restoration Process

Degradation
Degradation function H
Additive noise
Spatial domain
Frequency domain),(yx ),(),(*),(),( yxyxfyxhyxg  ),(),(),(),( vuNvuFvuHvuG 

Restoration),(
ˆ
Filtern Restoratio),( yxfyxg 

Noise Models
Sources of noise
Image acquisition, digitization,
transmission
White noise
The Fourier spectrum of noise is
constant
Assuming
Noise is independent of spatial
coordinates
Noise is uncorrelated with respect to
the image itself

Gaussian noise
The PDF of a Gaussian random variable,
z,
Mean:
Standard deviation:
Variance:22
2/)(
2
1
)(




z
ezp   2

70% of its values will be in the range
95% of its values will be in the range )(),(    )2(),2(  

Rayleigh noise
The PDF of Rayleigh noise,
Mean:
Variance:








az
azeaz
b
zp
baz
for 0
for )(
2
)(
/)(
2 4/ ba 4
)4(
2 



b

Erlang (Gamma) noise
The PDF of Erlang noise, ,
is a positive integer,
Mean:
Variance:









0for 0
0for
)!1()(

1
z
ze
b
za
zp
za
bb a
b
 2
2
a
b
 0a b

Exponential noise
The PDF of exponential noise, ,
Mean:
Variance:






0for 0
0for
)(

z
zae
zp
za a
1
 2
21
a
 0a

Uniform noise
The PDF of uniform noise,
Mean:
Variance:







otherwise0
if
1
)(
bza
ab
zp 2
ba
 12
)(
2
2 ab


Impulse (salt-and-pepper) noise
The PDF of (bipolar) impulse noise,
 : gray-level will appear as a
light dot, while level will appear like
a dark dot
Unipolar: either or is zero







otherwise0
for
for
)( bzP
azP
zp
b
a ab b a aP bP

Usually, for an 8-bit image, =0
(black) and =0 (white)b a

Modeling
Gaussian
Electronic circuit noise, sensor noise due
to poor illumination and/or high
temperature
Rayleigh
Range imaging
Exponential and gamma
Laser imaging

Impulse
Quick transients, such as faulty switching
Uniform
Least descriptive
Basis for numerous random number
generators

Periodic noise
Arises typically from electrical or
electromechanical interference
Reduced significantly via frequency
domain filtering

Estimation of noise parameters
Inspection of the Fourier spectrum
Small patches of reasonably constant
gray level
For example, 150*20 vertical strips
Calculate , , , from  a b 


Sz
ii
i
zpz)( 


Sz
ii
i
zpz )()(
22


Restoration in the Presence of Noise
Only-Spatial Filtering
Degradation
Spatial domain
Frequency domain),(),(),( yxyxfyxg  ),(),(),( vuNvuFvuG 

Mean filters
Arithmetic mean filter
Geometric mean filter


xy
Sts
tsg
mn
yxf
),(
),(
1
),(
ˆ mn
Sts
xy
tsgyxf
1
),(
),(),(
ˆ










Harmonic mean filter
Works well for salt noise, but fails fpr
pepper noise


xySts tsg
mn
yxf
),( ),(
1
),(
ˆ

Contraharmonic mean filter
 : eliminates pepper noise
 : eliminates salt noise





xy
xy
Sts
Q
Sts
Q
tsg
tsg
yxf
),(
),(
1
),(
),(
),(
ˆ 0Q 0Q

Usage
Arithmetic and geometric mean filters:
suited for Gaussian or uniform noise
Contraharmonic filters: suited for
impulse noise

Order-statistics filters
Median filter
Effective in the presence of both bipolar
and unipolar impulse noise)},({median),(
ˆ
),(
tsgyxf
xySts

Max and min filters
max filters reduce pepper noise
min filters salt noise)},({max),(
ˆ
),(
tsgyxf
xySts
 )},({min),(
ˆ
),(
tsgyxf
xy
Sts

Midpoint filter
Works best for randomly distributed noise,
like Gaussian or uniform noise







)},({min)},({max
2
1
),(
ˆ
),(),(
tsgtsgyxf
xyxy
StsSts

Alpha-trimmed mean filter
Delete the d/2 lowest and the d/2 highest
gray-level values
Useful in situations involving multiple
types of noise, such as a combination of
salt-and-pepper and Gaussian noise


xy
Sts
rtsg
dmn
yxf
),(
),(
1
),(
ˆ

Adaptive, local noise reduction filter
If is zero, return simply the value
of
If , return a value close to
If , return the arithmetic
mean value2
 ),(yxg 22
L


 ),(yxg 22
L


 Lm  
L
L
myxgyxgyxf  ),(),(),(
ˆ
2
2


Adaptive median filter
 = minimum gray level value in
 = maximum gray level value in
 = median of gray levels in
 = gray level at coordinates
 = maximum allowed size ofminz maxz medz xy
z maxS xy
S xy
S xy
S xy
S ),(yx

Algorithm:
Level A: A1=
 A2=
 If A1>0 AND A2<0, Go to
 level B
 Else increase the window size
 If window size
 repeat level A
 Else outputminzz
med maxzz
med maxS medz

Level B: B1=
 B2=
 If B1>0 AND B2<0, output
 Else outputmin
zz
xy
 max
zz
xy
 xy
z medz

Purposes of the algorithm
Remove salt-and-pepper (impulse) noise
Provide smoothing
Reduce distortion, such as excessive
thinning or thickening of object
boundaries

Periodic Noise Reduction by Frequency
Domain Filtering
Bandreject filters
Ideal bandreject filter












2
Dv)D(u, if1
2
Dv)D(u,
2
D if0
2
Dv)D(u, if1
),(
0
00
0
W
WW
W
vuH  
2/1
22
)2/()2/(),( NvMuvuD 

Butterworth bandreject filter of order n
Gaussian bandreject filtern
DvuD
WvuD
vuH
2
2
0
2
),(
),(
1
1
),(








 2
2
0
2
),(
),(
2
1
1),(







 


WvuD
DvuD
evuH

Bandpass filters),(1),( vuHvuH
brbp


Notch filters
Ideal notch reject filter

 

otherwise1
Dv)(u,Dor Dv)(u,D if0
),(
0201
vuH  
2/1
2
0
2
01 )2/()2/(),( vNvuMuvuD   
2/1
2
0
2
02 )2/()2/(),( vNvuMuvuD 

Butterworth notch reject filter of
order nn
vuDvuD
D
vuH








),(),(
1
1
),(
21
2
0

Gaussian notch reject filter









2
0
21 ),(),(
2
1
1),(
D
vuDvuD
evuH

Notch pass filter),(1),( vuHvuH
nrnp


Optimum notch filtering

Interference noise pattern
Interference noise pattern in the spatial
domain
Subtract from a weighted
portion of to obtain an
estimate of ),(),(),( vuGvuHvuN  )},(),({),(
1
vuGvuHyx

 ),(),(),(),(
ˆ
yxyxwyxgyxf  ),(yxg ),(yx ),(yxf

Minimize the local variance of
The detailed steps are listed in Page
251
Result),(
ˆ
yxf ),(),(
),(),(),(),(
),(
22
yxyx
yxyxgyxyxg
yxw




Linear, Position-Invariant Degradations
Input-output relationship),()],([),( yxyxfHyxg  )],([),( yxfHyxg  0),(yx

H is linear if
Additivity)],([)],([
)],(),([
21
21
yxfbHyxfaH
yxbfyxafH

 )],([)],([
)],(),([
21
21
yxfHyxfH
yxfyxfH


Homogeneity
Position (or space) invariant)],([ )],([
11 yxfaHyxafH  )],( )],([   yxgyxfH

In terms of a continuous impulse
function




  ddyxfyxf ),(),(),( 










 ddyxfH
yxfHyxg
),(),(
)],([),(

 
 





















ddyxhf
ddyxHf
ddyxfH
yxg
),,,(),(
),(),(
),(),(
),(

Impulse response of H
In optics, the impulse becomes a point
of light
Point spread function (PSF)
All physical optical systems blur
(spread) a point of light to some
degree)],([),,,(   yxHyxh ),,,( yxh

Superposition (or Fredholm) integral of
the first kind





 ddyxhf
yxg
),,,(),(
),(

If H is position invariant
Convolution integral),()],([   yxhyxH 






 ddyxhf
yxg
),(),(
),(

In the presence of additive noise
If H is position invariant),( ),,,(),(
),(
yxddyxhf
yxg
 





 ),( ),(),(
),(
yxddyxhf
yxg
 







If H is position invariant
Restoration approach
Image deconvolution
Deconvolution filter),(),(),(),( yxyxfyxhyxg  ),(),(),(),( vuNvuFvuHvuG 

Estimating the Degradation Function
Estimation by image observation
In order to reduce the effect of noise in
our observation, we would look for
areas of strong signal content),(
ˆ
),(
),(
vuF
vuG
vuH
s
s
s

Estimation by experimentation
Obtain the impulse response of the
degradation by imaging an impulse
(small dot of light) using the same
system settings
Observed image
The strength of the impulseA
vuG
vuH
),(
),( ),(vuG A

Estimation by modeling
Hufnagel and Stanley
Physical characteristic of atmospheric
turbulence6
5
22
)(
),(
vuk
evuH


Image motiondttyytxxfyxg
T
])(),([),(
0
00


dtdydxe
tyytxxf
dydxe
dttyytxxf
dydxeyxgvuG
yvxuj
T
yvxuj
T
yvxuj

)](),([

])(),([
),(),(
) (2
0
00
) (2
0
00
) (2





























Where),(),(
),(
),(),(
0
)]( )( [2
0
)]( )( [2
00
00
vuHvuF
dtevuF
dtevuFvuG
T
tyvtxuj
T
tyvtxuj








 


T
tyvtxuj
dtevuH
0
)]( )( [2
00
),(

If andTattx /)(
0 0)(
0ty uaj
T
Tatuj
T
txuj
eua
ua
T
dte
dtevuH

0
]/ [2
0
)]( [2
) sin(



),(
0












If andTattx /)(
0 Tbtty /)(
0 )(
)]( sin[
)(
),(
vbuaj
evbua
vbua
T
vuH






Inverse Filtering
Direct inverse filtering
Limiting the analysis to frequencies
near the origin),(
),(
),(
),(
),(
),(
ˆ
vuH
vuN
vuF
vuH
vuG
vuF


Minimum Mean Square Error (Wiener)
Filtering
Minimize
Terms
 = degradation function

 = complex conjugate of

 =
})
ˆ
{(
22
ffEe  ),(vuH ),(vuH ),(vuH 2
),(vuH ),(),( vuHvuH

 = power spectrum
of the noise
 = power spectrum
of the undegraded image2
),(),( vuNvuS 
 2
),(),( vuFvuS
f

Wiener filter),(
),(/),(),(
),(
),(
1
),(
),(/),(),(
),(*
),(
),(),(),(
),(),(*
),(
ˆ
2
2
2
2
vuG
vuSvuSvuH
vuH
vuH
vuG
vuSvuSvuH
vuH
vuG
vuSvuHvuS
vuSvuH
vuF
f
f
f
f
































White noise),(
),(
),(
),(
1
),(
ˆ
2
2
vuG
KvuH
vuH
vuH
vuF









Constrained Least Squares Filtering
Vector-matrix form

 , , :
 :g ),(),(*),(),( yxyxfyxhyxg  1MN MNMN H η f ηHfg 

Minimize
Subject to 





1
0
1
0
2
2
),(
M
x
N
y
yxfC 2
2
ˆ
ηfHg 

The solution
Where is the Fourier transform
of the function),(
),(),(
),(*
),(
ˆ
22
vuG
vuPvuH
vuH
vuF










 ),(vuP 













010
141
010
),(yxP

Computing by iteration
Adjust so that fHgr
ˆ
  a
22
ηr

Computation





1
0
1
0
2
2
),(
M
x
N
y
yxrr  
2
1
0
1
0
2
),(
1






M
x
N
y
myx
MN
  





1
0
1
0
),(
1
M
x
N
y
yx
MN
m 
 ][
22
2

mMN η

Algorithm
1: Specify an initial value of
2: Compute
3: Stop if is satisfied;
otherwise return to Step 2 after
increasing if or
decreasing if .a
22
ηr   a
22
ηr a
22
ηr

Geometric Mean FIlter),(
),(
),(
),(
),(*
),(
),(*
),(
ˆ
1
2
2
vuG
vuS
vuS
vuH
vuH
vuH
vuH
vuF
f




































Geometric Transformations
Spatial transformations
Tiepoints),(' yxrx ),(' yxsy

Bilinear equations4321),(' cxycycxcyxrx  8765),(' cxycycxcyxsy 

Gray-level interpolationdycxbyaxyxv  '''')','(
Tags