Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Degradation process:
Objective of restoration: To reconstruct original image as accurately as possible
Degradation and restoration model:
Degradation function H: normally linear and shift invariant system
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
1. The restoration in general is a complex process. It depends on the distortion model H and the nature of the noise.
2. If there is no distortion, then restoration becomes a denoising problem.
3. Usually, it is assumed that the noise is independent of the image, and noises at different pixels are also independent.
4. The signal to noise ratio is defined as
5. Peak signal to noise ratio is defined as
2
10 10210log =20log dBf f
n n
SNRσ σσ σ
=
10 1025520log =20log dBpeak pixel valueSNR
η ησ σ
=
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
(a) A digital image with standard deviation 55 , (b) the same image added with a noise of standard deviation 3 (making SNR to 25.26 dB), (c) the same image with SNR around 6 dB.
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Different Noises
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Gaussian noise:
Rayleigh noise:
Gamma noise:
−−= 22
2 2)(exp
21)(
σµ
πσxxp
4/ba πµ +=4
)4(2 πσ −= b
an=µ 22 an=σ
a > 0, n is a positive integer.
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Test Pattern
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Noise Corrupted Test Pattern
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Noise Corrupted Test Pattern (Cont’d)
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Sine Noise Corrupted Image
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Noise Corrupted Strip Image
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Noise reduction – spatial filtering
1 Mean filters
Arithmetic mean filter
),(),(),( yxyxfyxg η+= ),(),(),( vuNvuFvuG +=
∑∈
=xySts
tsgmn
yxf),(
),(1),(ˆ
Geometric mean filter
Harmonic mean filter
mn
Sts sy
tsgyxf
1
),(
),(),(ˆ
= ∏
∈
∑∈
=
xySts tsg
mnyxf
),( ),(1),(
ˆ
Contraharmonic mean filter
∑
∑
∈
∈
+
=
xy
xy
Sts
QSts
Q
tsg
tsgyxf
),(
),(
1
),(
),(),(ˆ
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
2 Order-statistic filters
Median filter
Max and Min filters
Midpoint filter
Alpha-trimmed filter
{ }),(),(ˆ),(
tsgmedianyxfxySts ∈
=
{ }),(max),(ˆ),(
tsgyxfxySts ∈
=
{ }),(min),(ˆ),(
tsgyxfxySts ∈
=
{ } { }
+=
∈∈),(min),(max
21),(ˆ
),(),(tsgtsgyxf
xyxy StsSts
∑∈−
=xySts
r tsgdmnyxf
),(),(1),(ˆ
Remove dark pixels
Remove white pixels
Remove salt-pepper noise
Remove outliers by excluding d/2 brightest and darkest pixels
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
2
2
2
2
2 2
2 2 2 2
( , ) ( , ) ( ( , ) )
Local mean
Noise variance
Local variance
If (less noise), then
If (more noise), then and i.e. when there is lo
NL
L
L
N
L
N L
N L N L L
f x y g x y g x y m
m
f g
f m
σσ
σ
σ
σ σ
σ σ σ σ
∧
∧
∧
= − −
= =
=
=
≈ ≈t of noise, we just average it over pixels.
∑∈ ),(),(
),( 1yxSts
tsgmn
3 Adaptive filters
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Local noise reduction filter
Pseudo code for adaptive median filter:
[ ]LL
myxgyxgyxf −−= ),(),(),(ˆ 22
σση
Stage A: A1=zmed-zmin A2=zmed-zmax If A1>0 and A20 and B2
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Arithmetic and Geometric Filtering
Guassian noise added
3X3 Averaging Geometric mean filtering
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Contraharmonic Filtering
(a) Pepper noise
(b) Salt noise
Q=1.5 Q=-1.5
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Q=1.5 Q=-1.5
Wrong Selection of Parameter
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
(a) Pepper & salt noise
(b) 3X3 Median
Order Statistic Filtering
2nd Median Filtering 3rd Median Filtering
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Results of Max & Min Filtering
Filtering of pepper noise corrupted image
3X3 Max filtering 3X3 Min filtering
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Mean Filtering & Order Statistic Filtering
Uniform noise
5X5 Arithmetic
Median filtering
Uniform + salt & pepper noise
Geometric mean
Trimmed mean filtering
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Filtering of Gaussian Noise with m=0
Gaussian noise added Arithmetic mean filtering
Geometric mean filtering Adaptive median filtering
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Salt & pepper corrupted Median filtering
Adaptive median filtering
Median and Adaptive Median Filtering
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Frequency Selective Filters
Ideal bandstop filter
Butterworth bandstop filter
Gaussian bandstop filter
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Removal of Sine Noise
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Sine Noise Image
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Notch Filters
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Notch Filtering
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Filtering process:
1
( , ) { ( , )},( , ) {[1 ( , )] ( , )}NR
G u v F g x yx y F H u v G u vη −
=
= −
),(),(),(),(ˆ yxyxwyxgyxf η−=
[ ]∑∑−=−=
−++++
=b
bt
a
as
yxftysxfba
yx2
2 ),(ˆ),(ˆ)12)(12(
1),(σ
To determine w(x,y), consider
∑∑−=−=
++++
=b
bt
a
astysxf
bayxf ),(ˆ
)12)(12(1),(ˆ
Where is average of in the neighborhood.
),(ˆ yxf),(ˆ yxf
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
2
2
]),(),(),([
)],(),(),([
)12)(12(1),( ∑∑
−=−=
−
−++++−++
++=
b
bt
a
asyxyxwyxg
tysxtysxwtysxg
bayx
η
ησ
),(),(thatAssume yxwtysxw =++
),(),(),(),( yxyxwyxyxw ηη =2
2
)],(),(),([
)],(),(),([
)12)(12(1),( ∑∑
−=−=
−
−++−++
++=
b
bt
a
asyxyxwyxg
tysxyxwtysxg
bayx
η
ησ
By setting 0),(),(2=
∂∂
yxwyxσ
),(),(
),(),(),(),(),( 22 yxyx
yxyxgyxyxgyxwηη
ηη
−
−=
we obtain
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Modeled by PSF
),(ˆ),(),(
vuFvuGvuH
s
ss = A
vuGvuH ),(),( =
Estimation degradation function
6/522 )(),( vukevuH +−=
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Air Turbulence Model
K=0.0025
K=0.001 K=0.00025
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Motion Blur Model
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
∫ −−=T
dttyytxxfyxg0
00 )](),([),(
Motion blurring model
[ ]
),(),(),(
)](),([),(
0
)]()([2
)(200
0
00 vuFvuHdtevuF
dtdxdyetyytxxfvuG
Ttvytuxj
vyuxjT
==
−−=
∫
∫ ∫∫
+−
+−∞
∞−
∞
∞−
π
π
dtevuHT
tvytuxj∫ +−=0
)]()([2 00),( π
Further assuming linear motion in both x and y directions: TbttyTattx /)(/)( 00 ==
)()](sin[)(
),( vbuajevbuavbua
TvuH +−++
= πππ
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Inverse filtering
),(),(
),(),(),(
),(ˆvuHvuN
vuFvuHvuG
vuF +==
For example
6/522 ])2/()2/[(),( NvMukevuH −+−−=
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Inverse Filtering
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Wiener (MMSE) filtering { }22 )ˆ( ffEe −=
),(),(/),(),(
),(),(
1
),(),(/),(),(
),(),(),(),(),(
),(),(),(ˆ
2
2
2
*
2
*
vuGvuSvuSvuH
vuHvuH
vuGvuSvuSvuH
vuHvuGvuSvuHvuS
vuSvuHvuF
f
ff
f
+=
+=
+=
η
ηη
∑∑
∑∑
∑∑
∑∑−
=
−
=
−
=
−
=−
=
−
=
−
=
−
=
−≈= 1
0
1
0
2
1
0
1
0
2
1
0
1
0
2
1
0
1
0
2
)],(ˆ),([
),(ˆ
),(
),(
M
x
N
y
M
u
N
vM
u
N
v
M
u
N
v
yxfyxf
yxf
vuN
vuFSNR
),(),(
),(),(
1),(ˆ 2
2
vuGKvuH
vuHvuH
vuF
+≈ ∑∑
−
=
−
=
−=1
0
1
0
2)],(ˆ),([1M
x
N
yyxfyxf
MNMSE
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Inverse and Wiener Filtering
Full inverse filtering Radially limited filtering Wiener filtering
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Motion Blur and Additive Noise
Corrupted image
Inverse and Wiener filtering
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Constrained LS Filtering
ηHfg +=Degraded image in matrix form:
Minimize [ ]∑∑−
=
−
=
∇=1
0
1
0
22 ),(M
x
N
yyxfC
Subject to 22ˆ ηfH-g =
),(),(),(
),(),(ˆ 22*
vuGvuPvuH
vuHvuF
+=
γ
where P(u,v) is FT of
−−−
−=
010141
010),( yxp
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Constrained LS Filtering
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Constrained LS Filtering with iteration of
Using correct noise parameters
Using wrong noise parameters
γ
γ
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Projection, back projection, and superimpose
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Reconstruction using back projections
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Reconstruction using different projections
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Reconstruction using back projections
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
∫ ∫∞
∞−
∞
∞−
−+= dxdyyxyxfg jkkkj )sincos(),(),( ρθθδθρ
∫ ∫∞
∞−
∞
∞−
−+= dxdyyxyxfg )sincos(),(),( ρθθδθρ
∑∑−
=
−
=
−+==1
0
1
0)sincos(),(),(),(
M
x
N
ykj yxyxfgg ρθθδθρθρ
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
≤+
=otherwise 0
x),(
222 ryAyxf
dyyfdxdyxyxfg ∫∫ ∫∞
∞−
∞
∞−
∞
∞−
=−= ),( )(),(),( ρρδθρ
dyAdyyfgr
r
r
r ∫∫−
−−
−
−−==
22
22
22
22),(),(
ρ
ρ
ρ
ρρθρ
≤−
==otherwise 0
r 2)(),(22 ρρρθρ rAgg
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
),ysing(xcos),(),( kkk θθθθρθ +== kgyxf k),sincos(),( θθθθ yxgyxf +=
∫=π
θ θ0
),(),( dyxfyxf
∑=
=π
θθ
0),(),( yxfyxf
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
∫∞
∞−
−= ρθρθω πωρdegG j2),(),(
dxdyeyxf
dxdydeyxyxfG
yxj
j
)sincos(2
2
),(
)sincos(),(),(
θθπω
πωρ ρρθθδθω
+−∞
∞−
∞
∞−
∞
∞−
∞
−∞−
∞
∞
−
∫∫
∫ ∫ ∫
=
−+=
[ ] cos ; sin( , ) ( , )( cos sin )
u vG F u v
Fω θ ω θ
ω θ
ω θ ω θ= =
=
= +
FT of projection:
Reconstruction of back-projected image using sinograms
~ Fourier slice
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Reconstruction using parallel-beam filtered backprojection
∫ ∫∞
−∞−
∞
∞
+= dudvevuFyxf vyuxj )(2),(),( π
∫ ∫∞
+=π
θθπω θωωθω2
0 0
)sincos(2),(),( ddeGyxf yxj
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
∫ ∫∞
∞−
+=π
θθπω θωθωω0
)sincos(2),(),( ddeGyxf yxj
θωθωωθθρ
ππωρ ddeGyxf
yx
j
sincos0
2),(),(+=
∞
∞−∫ ∫
=
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
To get complete and back-projected image: 1) Compute 1-D FT of each projection 2) Multiply each FT by the filter function which has
already multiplied by a suitable window 3) Obtain the inverse 1-D FT of each resulting filtered
transform 4) Integrate (sum) all the 1-D inverse transforms from
step 3).
||ω
≤≤
−−+
= otherwise 0
1)-(M0 1
2cos)1()(
ωπωω M
cch
Frequency-domain windowing function:
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Reconstruction using fan-beam filtered backprojection
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
αβθ += αρ sinD=
θρρθθθρπ
ddyxsgyxfT
T∫ ∫ −+=−
2
0
)sincos(),(21),(
)cos(sinsincoscossincos
ϕθθϕθϕθθ
−=+=+
rrryx
[ ] θρραθθρπ
ddrsgyxfT
T∫ ∫ −−=−
2
0
)cos(),(21),(
[ ] βαααϕαβ
βααϕαπ
α
ddDDrs
DgrfDT
DT
cossin)cos(
),sin(21),(
2 )/(sin
)/(sin
1
1
−−+
+= ∫ ∫−
− −
−
−
Let be the IFT of ( )s ρ | |ω
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
[ ] βαααϕαββαϕαπ
α
α
α
ddDDrsprfm
m
cossin)cos(),(21),(
2
−−+= ∫ ∫−
− −
)sin(sin)cos( ' αααϕαβ −=−−+ RDr
[ ] βααααβαϕαπ
α
α
α
ddDRsprfm
m
cos)'sin(),(21),(
2
−= ∫ ∫−
− −
)()sin
()sin( 2 αα
αα sR
Rs = βααβαϕα
α
π
dhqR
rfm
m
−= ∫∫
−
)'(),(1),(2
02
)(sin2
1)(2
αα
αα sh
= αβαβα cos),(),( Dpq =
),sin(),(),( βααθρβα +== Dggp
γαβ =∆=∆ [ ]γγγγ )(,sin),( nmnDgmnp += If
The n-th ray in the m-th radial projection is equal to the n-th ray in the (m+n)-th parallel projection!
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
© 1992–2008 R. C. Gonzalez & R. E. Woods
Chapter 5: Image Restoration and Reconstruction
Slide Number 1Slide Number 2Slide Number 3Slide Number 4Slide Number 5Slide Number 6Slide Number 7Slide Number 8Slide Number 9Slide Number 10Slide Number 11Slide Number 12Slide Number 13Slide Number 14Slide Number 15Slide Number 16Slide Number 17Slide Number 18Slide Number 19Slide Number 20Slide Number 21Slide Number 22Slide Number 23Slide Number 24Slide Number 25Slide Number 26Slide Number 27Slide Number 28Slide Number 29Slide Number 30Slide Number 31Slide Number 32Slide Number 33Slide Number 34Slide Number 35Slide Number 36Slide Number 37Slide Number 38Slide Number 39Slide Number 40Slide Number 41Slide Number 42Slide Number 43Slide Number 44Slide Number 45Slide Number 46Slide Number 47Slide Number 48Slide Number 49Slide Number 50Slide Number 51Slide Number 52Slide Number 53Slide Number 54Slide Number 55Slide Number 56Slide Number 57Slide Number 58Slide Number 59Slide Number 60Slide Number 61Slide Number 62Slide Number 63Slide Number 64Slide Number 65Slide Number 66