Upload
others
View
9
Download
0
Embed Size (px)
Citation preview
2010/10/10
1
Image Comm. Lab EE/NTHU 1
Chapter 5Image Restoration and Reconstruction
Chapter 5Image Restoration and Reconstruction
• Degraded digital image restoration• Degraded digital image restoration
– Spatial domain processing
Remove the additive noise
– Frequency domain
Hi hli ht th bl d iHighlight the blurred image
Image Comm. Lab EE/NTHU 2
5.1 Model of Image degradation and restoration5.1 Model of Image degradation and restoration
•g(x, y)=h(x, y)f(x, y)+(x, y)
•G(u, v)=H(u, v)F(u, v)+N(u, v)
2010/10/10
2
Image Comm. Lab EE/NTHU 3
5.2 Noise Model 5.2 Noise Model
• Spatial and frequency property of noise• Spatial and frequency property of noise– White noise (random noise)
– Gaussian noise22 2/)(
2
1)(
zezp
– : mean ; :variance
– 70% [(-), (+)]
– 95 % [(-2), (+2)]
Image Comm. Lab EE/NTHU 4
5.2 Noise Model 5.2 Noise Model
• Rayleigh noise• Rayleigh noise
The PDF is
• =a+(b/4)1/2
azfor
azforeazbzp
baz
0
)(2
)(/)( 2
• =b(4-)/4
2010/10/10
3
Image Comm. Lab EE/NTHU 5
5 2 Noise Model5 2 Noise Model5.2 Noise Model5.2 Noise Model
Image Comm. Lab EE/NTHU 6
5.2 Noise Model
• Erlang (gamma) noise
• =b/a; =b/a2
E ti l i
00
0)!1()(
1
zfor
zforeb
zazp
azbb
0zforae az
• Exponential noise
• =1/a; =1/a2
00
0)(
zfor
zforaezp
2010/10/10
4
Image Comm. Lab EE/NTHU 7
5.2 Noise Model 5.2 Noise Model
• Uniform noise bf
1
• =(a+b)/2; =(b-a)2/12
• Impulse noise (salt and pepper noise)
otherwise
bzaforabzp
0)(
• Impulse noise (salt and pepper noise)
otherwise
bzfor
azfor
P
P
zp b
a
0
)(
Image Comm. Lab EE/NTHU 8
5.2 Noise Model5.2 Noise Model
2010/10/10
5
Image Comm. Lab EE/NTHU 9
5.2 Noise Model5.2 Noise Model
Image Comm. Lab EE/NTHU 10
5.2 Noise Model5.2 Noise Model
2010/10/10
6
Image Comm. Lab EE/NTHU 11
5.2.3 Noise Model5.2.3 Noise Model--periodic noiseperiodic noise
• Periodic noise is due to the electrical or• Periodic noise is due to the electrical or electromechanical interference during image acquisition.
• It can be estimated through the inspection of the Fourier spectrum of the image.
Image Comm. Lab EE/NTHU 12
5.2.3 Noise Model-periodic noise5.2.3 Noise Model-periodic noise
2010/10/10
7
Image Comm. Lab EE/NTHU 13
5.2.4 Noise 5.2.4 Noise Model Model -- Noise parameters estimationNoise parameters estimation
• Capture a set of images of “flat” environment.• Use a optical sensor to capture the image of a solid• Use a optical sensor to capture the image of a solid
gray board that is illuminated uniformly. • The resulting image is a good indicator of system
noise.• Find the mean and standard deviation of the
histogram p(zi) of the resulting image.g p( i) g g
• From and calculate a and b (the parameter of that specific noise distribution).
Sz
iii
zpzμ )(
Sz
ii
2
i
zpμ-zσ )()( 2
Image Comm. Lab EE/NTHU 14
5.2.4 Noise Model -- Noise parameters estimationNoise parameters estimation5.2.4 Noise Model -- Noise parameters estimationNoise parameters estimation
2010/10/10
8
Image Comm. Lab EE/NTHU 15
5.3 Restoration using spatial filter5.3 Restoration using spatial filter
• The only degradation is the additive noisey gg(x, y)=f(x, y)+(x, y)G(u, v)=F(u, v)+N(u, v)
• Mean filters– Arithmetic mean filter
Sts
tsgmn
yxf)(
),(1
),(ˆ
– Geometric mean filter
xyStsmn ),(
mn
Sts xy
tsgyxf
/1
),(
),(),(ˆ
Image Comm. Lab EE/NTHU 16
5.3 Restoration using spatial 5.3 Restoration using spatial filterfilter
– Harmonic mean filter is good for salt noise not– Harmonic mean filter is good for salt noise not for pepper noise.
– Contra-harmonic filter: Q>0 reduce pepper i Q<0 d lt i
xySts tsg
mnyxf
),( ),(
1),(
ˆ
noise Q<0 reduce salt noise.
xy
xy
Sts
Q
Sts
Q
tsg
tsg
yxf
),(
),(
1
),(
),(
),(ˆ
2010/10/10
9
Image Comm. Lab EE/NTHU 17
5.3 Restoration using spatial filter5.3 Restoration using spatial filter
Image Comm. Lab EE/NTHU 18
5.3 Restoration using spatial filter5.3 Restoration using spatial filter
2010/10/10
10
Image Comm. Lab EE/NTHU 19
5.3 Restoration using spatial filter5.3 Restoration using spatial filter
Image Comm. Lab EE/NTHU 20
5.3 Restoration using spatial 5.3 Restoration using spatial filterfilter
• Order-Statistics filters ˆMedian filter
Max filter: find the brightest points to reduce the pepper noise
Min filter: find the darkest point to reduce the salt
),(),(ˆ),(
tsgmedianyxfxySts
),(max),(ˆ),(
tsgyxfxySts
Min filter: find the darkest point to reduce the salt noise
Midpoint filter
),(min),(ˆ),(
tsgyxfxySts
),(max),(min
2
1),(ˆ
),(),(tsgtsgyxf
xyxy StsSts
2010/10/10
11
Image Comm. Lab EE/NTHU 21
5.3 Restoration using spatial 5.3 Restoration using spatial filterfilter
• Alpha-trimmed mean filterp f
Suppose delete d/2 lowest and d/2 highest gray-level value in the neighborhood of (s, t)and average the rest.
tsgyxf ),(1
),(ˆ
where d=0 ~ mn-1
xyStsr tsg
dmnyxf
),(
),(),(
Image Comm. Lab EE/NTHU 22
5.3 Restoration using spatial filter5.3 Restoration using spatial filter
2nd pass 3rd pass
2010/10/10
12
Image Comm. Lab EE/NTHU 23
5.3 Restoration using spatial filter5.3 Restoration using spatial filter
Image Comm. Lab EE/NTHU 24
5.3 Restoration using spatial filter
5.3 Restoration using spatial filter
2010/10/10
13
Image Comm. Lab EE/NTHU 25
5.3 Restoration using spatial filter-Adaptive local noise reduction filter
Measurements for local region Sxy centered at (x, y)(1) noisy image at (x, y): g(x, y) with variance 2
(2) The local mean mL in Sxy
(3) The local variance 2L in Sxy
(4) The local variance of noise is high 2L ≥ 2
Conditions: Assume additive noise
(a) Zero-noise case: If 2 =0 then f(x, y)=g(x, y)
(b) Edges: If 2L > 2
then f(x, y)≈g(x, y) (edge preserved)(c) If 2
L = 2 then f(x, y)= mL,
(d) Adaptive filter (assume 2L ≥ 2
because Sxy is a subset of g(x, y)))
In practice, 2 is unknown, so a test is built before filtering
]),([),(),(ˆ2
2
LL
myxgyxgyxf
Image Comm. Lab EE/NTHU 26
5.3 Restoration using spatial filter5.3 Restoration using spatial filter
2010/10/10
14
Image Comm. Lab EE/NTHU 27
5.3 Restoration using spatial filter5.3 Restoration using spatial filter
• Adaptive median filter can handle impulse noise with larger probability (P and P are large)with larger probability (Pa and Pb are large).Increasing(change) window size during operation
• Notations:zmin=minimum gray-level value in Sxy
zmax=maximum gray-level value in Sxy
di l l l i Szmed=median gray-level value in Sxy
zxy= gray-level at (x, y)Smax=maximum allowed size of Sxy
Image Comm. Lab EE/NTHU 28
5.3 Restoration using spatial filter5.3 Restoration using spatial filter
• The adaptive median filter algorithm works in two levels:• Level A: A1=z d zLevel A: A1 zmed zmin
A2=zmed zmax
If A1>0 AND A2<0 goto level Belse increase the window sizeIf window size Smax repeat level Aelse output zelse output zxy
Level B: B1=zxy zmin
B2=zxy zmax
If B1>0 AND B2<0, output zxy
Else output zmed
2010/10/10
15
Image Comm. Lab EE/NTHU 29
5.3 Restoration using spatial filter5.3 Restoration using spatial filter
Image Comm. Lab EE/NTHU 30
5.4 Restoration using frequency5.4 Restoration using frequency--domain filterdomain filter5.4.1 5.4.1 BandBand--reject reject filterfilter
• Ideal band reject filterIdeal band reject filter
• Butterworth band reject filter
2/),(
2/),(2/
2/),(
1
0
1
),(
0
00
0
WDvuDif
WDvuDWDif
WDvuDif
vuH
• Butterworth band reject filter
n
DvuDWvuD
vuH 2
20
2 ),(),(
1
1),(
2010/10/10
16
Image Comm. Lab EE/NTHU 31
5.4.1 5.4.1 BandBand--reject reject filter filter
• Gaussian band reject filter• Gaussian band reject filter
220
2
),(
),(
2
1
1),(
WvuD
DvuD
evuH
Image Comm. Lab EE/NTHU 32
5.4.1 BandBand--reject reject filter filter 5.4.1 BandBand--reject reject filter filter
2010/10/10
17
Image Comm. Lab EE/NTHU 33
5.4.1 BandBand--reject reject filter filter 5.4.1 BandBand--reject reject filter filter
Image Comm. Lab EE/NTHU 34
5.4.2 5.4.2 BandpassBandpass filterfilter
• Obtained form band reject filter• Obtained form band reject filter
Hbp(u, v)=1-Hbr(u, v)
• To isolate an image of certain frequency band.
2010/10/10
18
Image Comm. Lab EE/NTHU 35
5.4.3 Restoration using frequency-domain filterBandpass filter
5.4.3 Restoration using frequency-domain filterBandpass filter
Image Comm. Lab EE/NTHU 36
5.4.4 Restoration using frequency-domain filter- Notch filtering
• Notch filter rejects (passes) frequencies in d fi d i hb h d bpredefined neighborhoods about a center
frequency. For notch rejects filter as
where
otherwise
DvuDorDvuDifvuH
1
),(),(0),( 0201
2/120
201 )2/()2/(),( vNvuMuvuD
2/120
202 )2/()2/(),( vNvuMuvuD
2010/10/10
19
Image Comm. Lab EE/NTHU 37
5.4 Restoration using frequency-domain filter-Notch filtering
• Butterworth notch reject filter• Butterworth notch reject filter
• Gaussian notch reject filter
n
vuDvuDD
vuH
),(),(1
1),(
21
20
20
21 ),(),(
2
1
1)( D
vuDvuD
evuH
Hnp(u, v)=1-Hnr(u, v)
• It becomes a low-pass filter when u0=v0=0
01),( evuH
Image Comm. Lab EE/NTHU 38
5.4 Restoration using frequency-domain filterNotch filtering
5.4 Restoration using frequency-domain filterNotch filtering
2010/10/10
20
Image Comm. Lab EE/NTHU 39
5.4.4 Notch filtering5.4.4 Notch filtering
Use 1-D Notch pass filter to find the horizontal ripple noise
Image Comm. Lab EE/NTHU 40
5.4.4 Optimal Notch filtering
• Clearly defined interference is not common.
• Images from electro-optical scanner are corrupted by periodic degradation.
• Several interference components are present.
• Place a notch pass filter H(u, v) at the location of each spike, i.e., N(u, v)=H(u, v)G(u, v), where G(u, v)is the corrupted image.
(x, y)=F-1{H(u, v)G(u, v)}.
• The effect of components not present in the estimate of (x, y) can be minimized.
2010/10/10
21
Image Comm. Lab EE/NTHU 41
5.4.4 Optimal Notch filtering5.4.4 Optimal Notch filtering
Image Comm. Lab EE/NTHU 42
5.4.4 Optimal Notch filter
• The restored image is ),(),(),(),(ˆ yxyxwyxgyxf
• The weighting function w(x, y) is found so that the variance of is minimized for a selected neighborhood.
• One way is to select w(x, y) so that the variance of the estimate is minimized over a small local neighborhood of size (2a+1, 2b+1).
),(ˆ yxfg ( , )
• ∂σ2 (x, y) /∂ w(x, y)=0 → to select w(x, y)
22 ),(ˆ),(ˆ)12)(12(
1),(
b
bt
a
as
yxftysxfba
yx
2010/10/10
22
Image Comm. Lab EE/NTHU 43
5.4.4 Notch filtering5.4.4 Notch filtering
a=b=15
Image Comm. Lab EE/NTHU 44
5.4.4 Notch filtering5.4.4 Notch filtering
2010/10/10
23
Image Comm. Lab EE/NTHU 45
5.4.4 Notch filtering5.4.4 Notch filtering
),(),(),(),(ˆ yxyxwyxgyxf
Image Comm. Lab EE/NTHU 46
5.5 Linear Position Invariant Degradation5.5 Linear Position Invariant Degradation
• The System Model η(x y)• The System Model
Hf(x, y)
η(x, y)
g(x, y)
g(x, y): the degraded image
f( ) h i i l if(x, y) : the original image
η(x, y): additive noise
H: System function which is a linear operator
2010/10/10
24
Image Comm. Lab EE/NTHU 47
5.5 Linear Position Invariant Degradation
g(x y)=H[f(x y)]+(x y)g(x, y)=H[f(x, y)]+(x, y)
Assume H is linear and (x, y)=0
If g(x, y)=H[f(x, y)] is position invariant then
H[f(x-, y-)]=g(x-, y-)
( ) H[f( )]+ ( )g(x, y)=H[f(x, y)]+ (x, y)
= +(x, y)
=h(x, y)*f(x, y)+ (x, y) ddyxhf ),(),(
Image Comm. Lab EE/NTHU 48
5.6 Estimating the Degradation Function
• To estimate the degradation functionTo estimate the degradation function
by Observation
by Experimentation
by Mathematical modeling
(Blind deconvolution)( )
2010/10/10
25
Image Comm. Lab EE/NTHU 49
5.6 Estimating the Degradation Function
• By observation: construct an unblurredBy observation: construct an unblurred image of some strong signal content.
• Let the observed image be gs(x, y)
• The constructed image is
• Assume the noise is negligible),(
~yxfs
g g
• Find the degradation function H(u, v) which is similar to
),(~
),(),(
vuF
vuGvuH
s
ss
Image Comm. Lab EE/NTHU 50
5.6 Estimating the Degradation Function5.6 Estimating the Degradation Function
• By experimentation: to obtain the impulse y p presponse of the degradation by imaging an impulse (small dot of light) using the same system setting.
• The Four Transform of an impulse is a constant A
• Let g(x, y) be the observed image.• Find the degradation function as
H(u, v)=G(u, v)/A
2010/10/10
26
Image Comm. Lab EE/NTHU 51
5.6 Estimating the Degradation Function5.6 Estimating the Degradation Function
Image Comm. Lab EE/NTHU 52
5.6 Estimating the Degradation Function 5.6 Estimating the Degradation Function --by modelingby modeling
• By Modeling: through experience• The physical characteristic of turbulence as
H(u, v)=e-k(u2+v2)5/6
where k is a constant which depend on the nature of turbulence.
• It is similar to the Gaussian Low pass• It is similar to the Gaussian Low pass. k=0.0025 (severe turbulence)k=0.001k=0.00025 (low turbulence)
2010/10/10
27
Image Comm. Lab EE/NTHU 53
5.6 Estimating the Degradation Function5.6 Estimating the Degradation Function
Image Comm. Lab EE/NTHU 54
5.6 Estimating the Degradation Function -by modeling
• Example:Example:
Image f(x, y) is blurred by uniform motion.
• x0(t) and y0(t) are the time varying component in x, y directions.
• The total exposure at any point of the film is p y pobtained by integrating the instantaneous exposure over the time interval during which the shutter is opened.
2010/10/10
28
Image Comm. Lab EE/NTHU 55
5.6 Estimating the Degradation Function-by modeling
• Assume T is duration of exposure the blurred image
x-5 x-4 x-3 x-2 x-1 x
Horizontal Motion direction y0=0
exposure, the blurred image g(x, y) is
• Fourier Transform of g(x, y) is
T
dttyytxxfyxg0
00 )](),([),(
dxdyvyuxjyxgvuG )](2exp[)()(
Exposure pixel
x0(t)=at/T, T=constant a=velocity
dxdyvyuxjxpedttyytxxf
dxdyvyuxjyxgvuG
T
)](2[)](),([
)](2exp[),(),(
0
00
Image Comm. Lab EE/NTHU 56
5.6 Estimating the Degradation Function-by modeling
• Reverse the order of integrationT
• The term inside the outer brackets is Fourier transform of the displacement
• Therefore
0 0
0
( , ) [ ( ), ( )]exp[ 2 ( )]G u v f x x t y y t j ux vy dxdy dt
T
),(),())]()((2exp[),(),(
))]()((2exp[),(),(
0
00
0
00
vuHvuFdttvytuxjvuFvuG
dttvytuxjvuFvuG
T
T
2010/10/10
29
Image Comm. Lab EE/NTHU 57
5.6 Estimating the Degradation Function-by modeling
• Assume uniform motion in x direction only, i.e.,(t) t/T (t) 0 is l it T d tix0(t)=at/T, y0(t)=0, a is velocity, T=exposure duration
• Simplify as0 00
( , ) exp[ 2 ( ( ) ( ))]T
H u v j ux t vy t dt 00
( , ) exp[ 2 ( ))]
[ 2 / )] i ( )
T
T j ua
H u v j ux t dt
Tj t T dt
• Problem: when u=n/a, H(u, v)=0
0exp[ 2 / )] sin( ) j uaj uat T dt ua e
ua
Image Comm. Lab EE/NTHU 58
5.6 Estimating the Degradation Function-by modeling
• If we allow y component movement with• If we allow y-component movement, with the motion given by y0=bt/T then the degradation function is
)())(sin()(
),( vbuajevbuab
TvuH
)( vbua
2010/10/10
30
Image Comm. Lab EE/NTHU 59
5.6 Estimating the Degradation Function-by modeling
5.6 Estimating the Degradation Function-by modeling
Image Comm. Lab EE/NTHU 60
5.6 Estimating the Degradation Function-by modeling
2010/10/10
31
Image Comm. Lab EE/NTHU 61
5.7 Inverse filtering5.7 Inverse filtering
• With degraded image: nfHg • With degraded image:
• Our goal is to find such that approximate g in a least square sense
nfHg
fHgn2
ˆ
fHˆf̂
)fH(g)fH(gfHgn T22 ˆˆˆ
Image Comm. Lab EE/NTHU 62
5.7 Inverse filtering
• Minimizing by using)ˆ(fn2
J 0ˆ/)ˆ( ffJ
gHgH)(HHgHH)(Hf 1T1T1T1T ˆ
)(G
0)ˆ(2ˆ/)ˆ( fHgHff TJ
• Or we may have),(
),(),(ˆ
vu
vuvu
H
GF
2010/10/10
32
Image Comm. Lab EE/NTHU 63
5.7 Inverse filtering
• Without noise ),(),(),( vuvuvu FHG
• We have
• With noise
),(),(
),(),(ˆ vu
vu
vuvu F
H
GF
),(),(),( vuvuvu FHG
),(),(),(),( vuvuvuvu NFHG
• We have
• Restored image
),(
),(),(),(ˆ
vu
vuvuvu
H
NFF
)},(ˆ{),(ˆ vuyxf F-1F
Image Comm. Lab EE/NTHU 64
5.7 Inverse filtering
F(u,v)
1/H(u,v)u, v
( )
u, v
2010/10/10
33
Image Comm. Lab EE/NTHU 65
5.7 Inverse filtering5.7 Inverse filtering
Degradation function:
H(u,.v)=e-k(u2+v2)5/6
K=0.0025, M=N=480
Image Comm. Lab EE/NTHU 66
5.8 Minimum Mean Square Error (Wiener) Filtering5.8 Minimum Mean Square Error (Wiener) Filtering
• Incorporate both the degradation function and statistical characteristics of noise into restoration
• Considering both the image and noise as random processes, and find an estimate of the uncorrupted image f (x y) such that the
),(ˆ yxfof the uncorrupted image f (x, y) such that the mean square error between them is minimized
• The error measure is e2=E{(f(x, y) – )2}),(ˆ yxf
2010/10/10
34
Image Comm. Lab EE/NTHU 67
5.8 Minimum Mean Square Error (Wiener) Filtering5.8 Minimum Mean Square Error (Wiener) Filtering
• Minimizing the error ∂e2 /∂f=0 we haveˆE{[f(x, y)– ]g(x’, y’)}=0
• For image coordinate pair (x, y) and (x’, y’), we assume the restoration filter is hR(x, y), and have
• Assume the ideal image and observed image are
),( yxf
( ) ( ) ( ) ( ) ( )x,y x',y' x,y x',y' x α,y β dα dβRE f g E g g h g g
jointly stationary, the expectation term can be expressed as covariance function as
ddyxhyxKyyxxK Rggfg ),()','()','(
Image Comm. Lab EE/NTHU 68
5.8 Minimum Mean Square Error (Wiener) Filtering
• Take Fourier Transform we have• Take Fourier Transform we have
HR(u, v)=Wfg(u, v)Wgg-1(u, v)
with additive noise
Wfg(u, v)=H*(u, v)Sf(u, v)
Wgg(u, v)= |H(u, v)|2 Sf (u, v)+S(u, v)f
• H(u, v): the degradation function
• S(u, v)=|N(u, v)|2=power spectrum of the noise
• Sf(u, v)=|F(u, v)|2=power spectrum of the signal
2010/10/10
35
Image Comm. Lab EE/NTHU 69
5.8 Minimum Mean Square Error (Wiener) Filtering5.8 Minimum Mean Square Error (Wiener) Filtering
Assume the image and noise are uncorrelated
),(),(*
),(),(),(),(
),(),(*),(ˆ
2
2
vuGvuH
vuGvuSvuHvuS
vuSvuHvuF
f
f
),(),(/),(),(
),(
),(
1
),(),(/),(),(
2
2
2
vuGvuSvuSvuH
vuH
vuH
vuGvuSvuSvuH
f
f
Image Comm. Lab EE/NTHU 70
5.8 Minimum Mean Square Error (Wiener) Filtering5.8 Minimum Mean Square Error (Wiener) Filtering
• H(u, v): the degradation function( , ) g
• S(u, v)=|N(u, v)|2= power spectrum of the noise
• Sf(u, v)=|F(u, v)|2= power spectrum of the undegraded function
• If noise is zero, then it becomes an inverse filter.
• For a white noise |N(u, v)|2=constant then
),(),(
),(
),(
1),(ˆ
2
2
vuGKvuH
vuH
vuHvuF
2010/10/10
36
Image Comm. Lab EE/NTHU 71
5.8 Minimum Mean Square Error (Wiener) Filtering5.8 Minimum Mean Square Error (Wiener) Filtering
Image Comm. Lab EE/NTHU 72
5.8 Minimum Mean Square Error
(Wiener) Filtering
5.8 Minimum Mean Square Error
(Wiener) Filtering
2010/10/10
37
Image Comm. Lab EE/NTHU 73
5.9 Constraint Least Squares Filtering5.9 Constraint Least Squares Filtering
• Difficulty for Wiener filter: the power spectra of the undegraded image and the noise must be knownundegraded image and the noise must be known.
• Only the mean and variance of the noise are required
• Given a noisy image in vector form
with g(x, y) has a size MN, the matrix H has dimension MN MN and H is highly sensitive to noise.
• Base optimality of restoration on a measure of smoothness,
nfHg
p y ,such as the 2nd derivative of an image, i.e.,
• Find the minimum of C subject to the constraint
1
0
1
0
22 ),(M
x
N
y
yxfC
22ˆ ηfHg
Image Comm. Lab EE/NTHU 74
5.9 Constraint Least Squares Filtering5.9 Constraint Least Squares Filtering
• The frequency domain solution to this optimization problem isproblem is
where is a parameter that must be adjusted so that the constraint is satisfied.
)v,u(G)v,u(P)v,u(H
)v,u(*H)v,u(F 22
22ˆ ηfHg
• P(u,v) is Fourier transform of
010
141
010
),( yxp
2010/10/10
38
Image Comm. Lab EE/NTHU 75
5.9 Constraint Least Squares Filtering5.9 Constraint Least Squares Filtering
Image Comm. Lab EE/NTHU 76
5.9 Constraint Least Squares Filtering5.9 Constraint Least Squares Filtering
• To compute by iteration as follows:p y
Step 1. Define the residue vector r:
is a function of , so is r,
()=rTr=||r||2 is a monotonically increasing function of
Step 2 Adjust so that ||r||2 = || ||2 a
fHgr ˆ),(ˆ vuF
Step 2. Adjust so that ||r||2 = || ||2 a
where a is a accuracy factor
Step 3. If ||r||2 || ||2 then the best solution is found.
2010/10/10
39
Image Comm. Lab EE/NTHU 77
5.9 Constraint Least Squares Filtering5.9 Constraint Least Squares Filtering
• Because () is monotonic finding is not difficult• Because () is monotonic, finding is not difficult.
Step 1: Specify an initial
Step 2: Compute ||r||2
Step 3: if ||r||2 = || ||2 a is satisfied then stop
Step 4: if ||r||2 < || ||2–a increase and go to step 2Step 4: if ||r|| < || || a increase and go to step 2.
Step 5: if ||r||2 > || ||2–a decrease and go to step 2.
Image Comm. Lab EE/NTHU 78
5.9 Constraint Least Squares Filtering5.9 Constraint Least Squares Filtering
• To compute the ||r||2 and || ||2
• The vector form can also be rewritten as
• Compute the Inverse Fourier transform of R(u, v) and have
• Consider the variance of the noise over the entire image, i h l h d
),(ˆ),(),(),( vuFvuHvuGvuR
1
0
1
0
22),(
M
x
N
y
yxrr
using the sample-average method
where
• So we have
1
0
1
0
22 ),(1 M
x
N
y
myxMN
1
0
1
0
),(1 M
x
N
y
yxMN
m
221
0
1
0
22),( mMNyx
M
x
N
y
η
2010/10/10
40
Image Comm. Lab EE/NTHU 79
5.9 Constraint Least Squares Filtering5.9 Constraint Least Squares Filtering
Image Comm. Lab EE/NTHU 80
5.10 Geometric Mean Filter5.10 Geometric Mean Filter
1
Generalized form of Wiener filter:
),(
),(
),(),(
),(*
),(
),(*),(ˆ
22 vuG
vuS
vuSvuH
vuH
vuH
vuHvuF
f
, are positive real constant
=1 reduces to inverse filter
=0 becomes parametric Wiener filter
=0, =1 standard Wiener filter
=1/2, =1 spectrum equalization filter
2010/10/10
41
Image Comm. Lab EE/NTHU 81
5.11 5.11 Image Reconstruction From ProjectionImage Reconstruction From Projection
• Introduction• Reconstructing an image from a series of projections.• Suppose image (2-D area) represents an cross-section
of human body.• Assume a single object on a uniform background.• The background in the image represents soft, uniform
tissue, whereas the round object is a tumor with higher absorption characteristicsabsorption characteristics.
e.g., X-ray Computed Tomography (CT)• Project the 1-D signal back across a 2-D area: duplicate
the 1-D signal in all column of the reconstructed image. backprojection
Image Comm. Lab EE/NTHU 82
5.11 5.11 Image Reconstruction From ProjectionImage Reconstruction From Projection
2010/10/10
42
Image Comm. Lab EE/NTHU 83
5.11 5.11 Image Reconstruction From ProjectionImage Reconstruction From Projection
• Rotate the source-detector pair by 90 degree.• A back-projection in vertical direction.• Assume the number of back-projections increase• Adding the all back-projections.
Image Comm. Lab EE/NTHU 84
5.11 5.11 Image Reconstruction From ProjectionImage Reconstruction From Projection
2010/10/10
43
Image Comm. Lab EE/NTHU 85
5.11 5.11 Image Reconstruction From ProjectionImage Reconstruction From Projection
Image Comm. Lab EE/NTHU 86
5.11.2 Principal of Computed Tomography5.11.2 Principal of Computed Tomography
• X-ray Computed Tomography obtain a 3-D representation of the internal structure of an object byrepresentation of the internal structure of an object by X-raying the object from many directions.
• 2-D projections can be used to reconstruct the 3-D structure.
• The number of detectors the 1-D projection CT more practicalmore practical.
• Randon transform: in 1917, Johann Randon.
• Allan Cormack in 1963 applied the theory to build a CT prototype.
2010/10/10
44
Image Comm. Lab EE/NTHU 87
5.11.2 Principal of Computed Tomography5.11.2 Principal of Computed Tomography
• 1st generation CT scanner: a “pencil” X-ray beam and a single detector. The source-detector pair translates and then rotates as shown in Fig. 5.35 (a)
• 2nd generation CT scanner: a fan-shape beam, multiple detectors an fewer translation. i.e., Fig. 5.35 (b).
• 3rd generation CT scanner: a bank of detectors to cover the entire field of view of a wider beam (no translation required), i.e., Fig. 5.35 (c).
• 4th generation CT scanner: a circular ring of detectors to cover the entire field of view of a wider beam (no translation required), i.e., Fig. 5.35 (d).
Image Comm. Lab EE/NTHU 88
5.11.2 Principal of Computed Tomography5.11.2 Principal of Computed Tomography
2010/10/10
45
Image Comm. Lab EE/NTHU 89
5.11.2 Principal of Computed Tomography5.11.2 Principal of Computed Tomography
• 5th generation Electronic Beam CT (EBCT): no mechanical motion required. Tungstan anodes circles the patient which
t f b d it i f d t tgenerate a fan beam and excites a ring of detectors.
• The patient need to be stationary during the scanning time. The scanning is halt while the position of patient is incremented.
• 6th generation helical CT scanner : the source/detector pair rotates continuously 360 while patient is moving.
• 7th generation Multi-slice CT scanner: “thick” fan beam are used in conjunction to the parallel banks of detectors to collect volumetric CT data simultaneously.
• It generates 3-D cross-sectional “slabs” rather than single cross-sectional images. It utilizes X-ray tube more efficiently and less X-ray dosage.
Image Comm. Lab EE/NTHU 90
5.11.3 Projections and Random Transform5.11.3 Projections and Random Transform
• CT imaging: X-ray, SPECT, PET, MRI• A straight line in Cartesian coordinate y=ax+b can beA straight line in Cartesian coordinate y ax b can be
described in polar coordinate as xcosθ +ysin θ =ρ
2010/10/10
46
Image Comm. Lab EE/NTHU 91
5.11.3 Projections and 5.11.3 Projections and Random TransformRandom Transform
•A projection of a parallel beam can be modeled as a set of lines as Figure 5.37•An arbitrary point in the projection signal can be given by a•An arbitrary point in the projection signal can be given by a ray sum along the line xcosθk +ysin θk =ρj (i.e., L(j, k))
Image Comm. Lab EE/NTHU 92
5.11.3 Projections and Random Transform5.11.3 Projections and Random Transform
• The ray-sum is a line integral
dxdyyxyxfg jkkkj )sincos(),(),(
• The δ function indicates that the integral is computed along the line xcosθk +ysin θk =ρj. We consider all θ and ρ as
• In discrete case, it can be described as
yyyfg jkkkj )(),(),(
1 1
)i()()(M N
f
dxdyyxyxfg )sincos(),(),(
where x, y, θ, and ρ are discrete variable.
• Random transform: It generates the projection of f(x, y) along an arbitrary line in the xy-plane i.e., R{f(x, y)}=g(ρ, θ).
0 0
)sincos(),(),(x y
yxyxfg
2010/10/10
47
Image Comm. Lab EE/NTHU 93
5.11.3 Projections and Random 5.11.3 Projections and Random TransformTransform
Example 5.17:
ryxA 222
where A is a constant, r is the radius of the object.
Since the object is circularly symmetry, th j ti i th f ll
otherwise
ryxAyxf
0),(
the projection is the same for all directions.
Let θ=0 we have
dyyfdxdyxyxfg ),()(),(),(
Image Comm. Lab EE/NTHU 94
5.11.3 Projections and Random Transform5.11.3 Projections and Random Transform
Example 5.17 (cont.)
• Since g(ρ, θ)=0 when ρ > rg(ρ, ) ρ
• The integral can be evaluated between r ρ r or
from to
• So we have
22 ry 22 ry
22
22
22
22),(),(
r
r
r
rAdydyyfg
rrA2 22 or
• g is independent of θ because the object is symmetry about the origin.
otherwise
rrAgg
0
2)(),(
2010/10/10
48
Image Comm. Lab EE/NTHU 95
5.11.3 Projections and Random Transform5.11.3 Projections and Random Transform
• The Random transform g(ρ, θ) is displayed as an image with ρand θ as rectangular coordinate, it is called a sinogram as h i Fi 5 39 ( i il t F i T f )shown in Figure 5.39. (similar to Fourier Transform).
• Sinogram is symmetric in both directions about the center of image object is symmetric and parallel to x and y axes.
• Sinogram is smooth object has a uniform intensity.
• CT Obtain a 3-D representation of a volume from its projections.
• Back-project each projection and then sum all the projections to generate the image (slice).
• Stacking all resulting images (slices) 3-D rendering of the volume.
Image Comm. Lab EE/NTHU 96
5.11.3 Projections and Random 5.11.3 Projections and Random TransformTransform
2010/10/10
49
Image Comm. Lab EE/NTHU 97
• A single point g(ρj, θk) of the complete projection g(ρ, θk ) with fixed θk as shown in Figure 5.37.
F i f i b b k j i hi i l i
5.11.3 Projections and 5.11.3 Projections and Random TransformRandom Transform
• Forming part of an image by back-projecting this single point g(ρj, θk) Copying the line L(ρj, θk) onto the image where each point in that line is g(ρj, θk).
• Repeat the process for all ρj (fixed θk) we have
fθk(x, y)=g(ρ, θk)=g(xcosθk+ysinθk , θk)
Th i f d f i l b k j i b i d• The image formed from a single back-projection obtained at an angle θ is fθ(x, y)=g(xcosθ+ysinθ, θ)
• We form the final image by integrating over all the back-projected images
• Or in discrete case
dyxfyxf ),(),(0
),(),(0
yxfyxf
Image Comm. Lab EE/NTHU 98
5.11.3 Projections and Random 5.11.3 Projections and Random TransformTransform
Example 5.18
is used to generate the back-projected ),(),( yxfyxf
g p j
image from projections g(, ) as shown in Figures 5.32~5.34
and Figure 5.40.
),(),(0
yfyf
2010/10/10
50
Image Comm. Lab EE/NTHU 99
5.11.4 The 5.11.4 The Fourier Slice TheoremFourier Slice Theorem
• 1-D transform of a projection with respective to ρ is
degG j 2),(),(
dxdydeyxyxfG j2)sincos(),(),(
dxdydeyxyxfG j 2)sincos()()( dxdydeyxyxfG j
)sincos(),(),(
dxdyeyxfG yxj
)sincos(2),(),(
Image Comm. Lab EE/NTHU 100
5.11.4 The Fourier Slice Theorem5.11.4 The Fourier Slice Theorem
• By letting u=ωcosθ and v=ωsinθ we have
• Or
sin,cos
)(2),(),(
vu
vyuxj dxdyeyxfG
)sin,cos(),(),( sin,cos FvuFG vu
2010/10/10
51
Image Comm. Lab EE/NTHU 101
5.11.4 The 5.11.4 The Fourier Slice TheoremFourier Slice Theorem
degG j2),(),(
)sin,cos(),(),( sin,cos FvuFG vu
Image Comm. Lab EE/NTHU 102
5.11.5 Reconstruction 5.11.5 Reconstruction using Parallelusing Parallel--BeamBeam
• 2-D inverse Fourier transform
• By letting u=ωcosθ and v=ωsinθ and dudv= ωdωdθ
dudvevuFyxf vyuxj
)(2),(),(
ddeFyxf yxj
)sincos(2)sin,cos(),(
ddGf yxj )sincos(2)()(
• Since G(ω, θ+180o)=G(ω, θ), we have
ddeGyxf yxj
)sincos(2),(),(
ddeGyxf yxj
)sincos(2),(),(
2010/10/10
52
Image Comm. Lab EE/NTHU 103
5.11.5 Reconstruction 5.11.5 Reconstruction using Parallelusing Parallel--BeamBeam
• Integral with respect to ω, the term xcosθ+ysinθ is a constant, treated as xcosθ+ysinθ =ρtreated as xcosθ+ysinθ ρ
• The added term ω is recognized as a 1-D filter function a ramp filter which is not integrable (as shown in Figure 5.42)
• Use a box (or window) to band limit the ramp filter
ddeGyxfyx
j
sincos
2),(),(
• Use a box (or window) to band-limit the ramp filter.
• Windowing the ramp so that it becomes zero outside a defined frequency interval (as shown in Figure 5.42(d) ).
• Filtered back-projection
Image Comm. Lab EE/NTHU 104
5.11.5 Reconstruction 5.11.5 Reconstruction using Parallelusing Parallel--BeamBeam
otherwise
MM
cchwindow0
)1(01
2cos)1()(
otherwise0
h()( )
Hamming window: c=0.5
2010/10/10
53
Image Comm. Lab EE/NTHU 105
5.11.5 Reconstruction 5.11.5 Reconstruction using Parallelusing Parallel--BeamBeam
• G(ω, θ) is the 1-D transform of g(ρ, θ) which is a single projection obtained at a fixed angle θ.projection obtained at a fixed angle θ.
• The complete back-projected image f(x, y) is obtained by the following steps:
1. Compute the 1-D Fourier Transform of each single projection at a fixed angle θ, i.e., g(ρ, θ).
2. Multiply each Fourier Transform G(ω,θ) by the filter function hi h i lti li d b it bl i d i f ti ω which is multiplied by a suitable windowing function.
3. Obtain the inverse 1-D Fourier Transform of each filtered transform.
4. Integral (sum) all the 1-D inverse transform from step 3.
Image Comm. Lab EE/NTHU 106
5.11.5 Reconstruction 5.11.5 Reconstruction using Parallelusing Parallel--BeamBeam
Example
2010/10/10
54
Image Comm. Lab EE/NTHU 107
5.11.5 Reconstruction 5.11.5 Reconstruction using Parallelusing Parallel--BeamBeam
Example
Image Comm. Lab EE/NTHU 108
5.11.5 Reconstruction 5.11.5 Reconstruction using Parallelusing Parallel--BeamBeam
Let s()=F1{} and is the spatial convolution
ddyxsg
dgs
ddeGyxf
yx
yx
j
0
sincos0
sincos0
2
)sincos(),(
),()(
),(),(
ygyx
0 sincos
)()(
• Individual back-projection at angle can be obtained byconvolving the corresponding projection of g(, ) and s() .
2010/10/10
55
Image Comm. Lab EE/NTHU 109
5.11.6 Reconstruction 5.11.6 Reconstruction using Fanusing Fan--BeamBeam
Let p(, ) denote the fan beam projection.
is the angular position of a particular detector measured with t t th t i th l di l t f threspect to the center ray. is the angular displacement of the
source measured with respect to the y-axis
L(ρ, θ) is a normal form projection ray of p(, ) .y p( , )
with θ= +and ρ = Dsin
Image Comm. Lab EE/NTHU 110
5.11.6 Reconstruction 5.11.6 Reconstruction using using FanFan--Beam filtered Beam filtered backprojectionbackprojection
We assume that object encompass within a circular area of radius T about the origin of plane, g(, )=0 for >Tg p g( )
The convolution back-projection formula for the parallel-imaging becomes
ddyxsgyxfT
T
2
0)sincos(),(
2
1),(
Integrating with respect to and L t i d + i ( )Let x = r cos , y = r sin , and xcos +ysin = r cos( ),
We have
ddrsgyxfT
T
2
0)))(cos(),(
2
1),(
2010/10/10
56
Image Comm. Lab EE/NTHU 111
Using θ= + and ρ = D sin , we change the integral from f(x y) to f(r ) based on x = r cos y = r sin
5.11.6 Reconstruction using Fan5.11.6 Reconstruction using Fan--Beam filtered Beam filtered backprojectionbackprojection
f(x, y) to f(r, ) based on x r cos , y r sin ,
ddD
DrsDgrfDT
DT
cos
sin)cos(),sin(2
1),(
2 )/(sin
)/(sin
1
1
Figure 5.46 shows that sin1(T/D) has maximum value m
ddD
Drsprfm
m
cos
sin)cos(),(2
1),(
2
0
p(, ) = g(ρ, θ) or p(, ) = g(Dsin , +)
Image Comm. Lab EE/NTHU 112
5.11.6 Reconstruction 5.11.6 Reconstruction using using FanFan--Beam filtered Beam filtered backprojectionbackprojection
sin1(T/D) has maximumsin (T/D) has maximum value of m corresponding to>T
2010/10/10
57
Image Comm. Lab EE/NTHU 113
5.11.6 5.11.6 Image Reconstruction Image Reconstruction using Fanusing Fan--Beam Beam filtered filtered backprojectionbackprojection
Rcos(+) Dsin = Rsin()
R and are determined by r R and are determined by r, ,
Image Comm. Lab EE/NTHU 114
• By substituting
5.11.6 5.11.6 Image Reconstruction Image Reconstruction using Fanusing Fan--Beam Beam filtered filtered backprojectionbackprojection
2
cos)'sin(),(1
),( ddDRsprfm
where and q( ) = p( )Dcos
2
0 2)'(),(
1
2
1),( ddhq
Rrf
m
m
)(sin
sin2
sR
Rs
2
1
h
0
)(),(2
),( pfm
where and q(, ) p(, )Dcos
• A fan-beam projection p taken at angle corresponding to parallel beam projection g taken at corresponding angle
p(, ) = g(, ) = g(D sin, +)
sin2
h
2010/10/10
58
Image Comm. Lab EE/NTHU 115
5.11.6 5.11.6 Image Reconstruction Image Reconstruction using Fanusing Fan--Beam Beam filtered filtered backprojectionbackprojection
p(,) = g(, ) = g(Dsin, +)
• is angular increment between two successive fan beam• is angular increment between two successive fan-beam
projections.
• is angular increment between two rays it determines the
number of samples in each projection.
• Let = = , = n , = mLet , n , m
p(n , m) = g[Dsin n , (m+n)]
• The nth ray in the mth radial projection
= the nth ray in the (m+n)the parallel projection
Image Comm. Lab EE/NTHU 116
5.11.6 Reconstruction using Fan5.11.6 Reconstruction using Fan--Beam filtered Beam filtered backprojectionbackprojection
2010/10/10
59
Image Comm. Lab EE/NTHU 117
5.11.6 Reconstruction using Fan5.11.6 Reconstruction using Fan--Beam filtered Beam filtered backprojectionbackprojection
Image Comm. Lab EE/NTHU 118
5.12 Geometric Transformation5.12 Geometric Transformation
• It is also called Rubber sheet transform• It is also called Rubber sheet transform, which consists of two operations:
1) Spatial transformation: rearrangement of the pixels (locations) on the image.
2) Gray-level interpolation: assignment of ) G y p ggray levels to pixels in the spatially transformed image.
2010/10/10
60
Image Comm. Lab EE/NTHU 119
5.12 Geometric Transformation-Geometric Distortion
5.12 Geometric Transformation-Geometric Distortion
Image Comm. Lab EE/NTHU 120
5.12 Geometric Transformation-Geometric Distortion
5.12 Geometric Transformation-Geometric Distortion
2010/10/10
61
Image Comm. Lab EE/NTHU 121
5.11 Geometric TransformationSpatial transformation
5.11 Geometric TransformationSpatial transformation
Mapping function T : maps a point from screen space to a point in texture spacescreen space to a point in texture space
Screen space Texture space
Image Comm. Lab EE/NTHU 122
5.12 5.12 Geometric TransformationGeometric TransformationSpatial transformationSpatial transformation
• The transformation T may be expressed as
x’=r(x, y)=c1x+c2y+c3xy+c4
y’=s(x, y)=c5x+c6y+c7xy+c8
Find the tiepoints, which are subset of pixels whose locations in the distorted image (in
) d th t d i (iscreen space) and the corrected images (in texture space) are known precisely.
2010/10/10
62
Image Comm. Lab EE/NTHU 123
5.12 Geometric Transformation-Spatial transformation
• General Transformation:• General Transformation:
h
x y w u v w T' ' ' 1
131211 SSS
where
333231
2322211
SSS
SSST
Image Comm. Lab EE/NTHU 124
5.12 Geometric Transformation-Spatial transformation
• T is said to be one-to-one if:• T1 is said to be one-to-one if:(a) The inverse transformation of T1 always exists.
(b) With T1, one point in screen space produces only one point in texture space
(c) Through T1-1, each point in texture space can find
th di i t ithe corresponding point in screen space.
=> that is the determinate of T1 is nonzero.
2010/10/10
63
Image Comm. Lab EE/NTHU 125
5.12 Geometric Transformation-Spatial transformation
• The 3×3 transformation matrix can be bestThe 3×3 transformation matrix can be bestunderstood by partitioning it into fourseparate sections.
• Rotation:
2221
12112 SS
SST
• Translation:• Perspective transformation:• Scaling:
S S31 32
S ST
13 23
S33
Image Comm. Lab EE/NTHU 126
5.12 5.12 Geometric TransformationGeometric Transformation--Spatial transformationSpatial transformation
• The general representation of an Affine transformation is :
1
0
0
]1[]1[
3231
2221
1211
aa
aa
aa
vuyx
• It is a planar mapping, that can be used to map an input triangle to any arbitrary triangle at the output
2010/10/10
64
Image Comm. Lab EE/NTHU 127
5.12 Geometric Transformation-Spatial transformation
5.12 Geometric Transformation-Spatial transformation
Affine Transformation
Image Comm. Lab EE/NTHU 128
5.12 Geometric Transformation-Spatial transformation
5.12 Geometric Transformation-Spatial transformation
Perspective Transformation
333231
232221
131211
],,[],,[
aaa
aaa
aaa
wvuwyx
312111 avaua and let w=1
322212/avaua
332313
312111/avaua
avauawxx
332313
322212/avaua
avauawyy
If then it becomes Affine Transformation02313 aa
2010/10/10
65
Image Comm. Lab EE/NTHU 129
5.12 5.12 Geometric TransformationGeometric Transformation--Spatial transformationSpatial transformation
• Perspective projectionp p j
X axis
Y axis
P(X,Y,Z)
YZ axis
(X ,Y ,0)P P
Z
D
xZ axis
Center of prjection
Projection Plane
Image Comm. Lab EE/NTHU 130
5.12 5.12 Geometric TransformationGeometric Transformation--Spatial transformation
• Any position along the projection line is• Any position along the projection line is (α,β,γ) is
where δ=Z/(Z+D) and 0<δ<1
X X
Y Y
Z Z D( )
where δ Z/(Z+D), and 0<δ<1
)1
1(
D
ZXX p )
1
1(
D
ZYYp
2010/10/10
66
Image Comm. Lab EE/NTHU 131
5.12 5.12 Geometric TransformationGeometric Transformation--Spatial transformation
• Perspective Transformation
Image Comm. Lab EE/NTHU 132
5.12 5.12 Geometric TransformationGeometric Transformation--Spatial transformation
• Bilinear transformation is defined asf
where W=[u, v, 1] and Z=[x, y, 1]
ZT W: TWZ
0
0311
b
vbba
T
and are constant.
1
0
00
232
ba
buaaT
3210,3210 and,,,,,, bbbbaaaa
2010/10/10
67
Image Comm. Lab EE/NTHU 133
5.12 5.12 Geometric TransformationGeometric Transformation--Spatial transformation
Bilinear distortion for reference quadrangle and pointsBilinear distortion for reference quadrangle and points.
P
P
P
P
1
2
3
v
Y
T -1
P4
P1
P2 P3
P4' '
'(0,1) (1,1)
(1,0)(0,0)
u
X
T
Image Comm. Lab EE/NTHU 134
5.12 Geometric Transformation-gray-level interpolation
5.12 Geometric Transformation-gray-level interpolation
2010/10/10
68
Image Comm. Lab EE/NTHU 135
5.12 5.12 Geometric TransformationGeometric Transformation--gray-level interpolation
• Zero-order interpolation: the simplest one.• Bilinear interpolation: using four neighbors to do• Bilinear interpolation: using four neighbors to do
the interpolation for the gray level of non-integer point at (x’, y’):
v(x’, y’)=a+bx’+cy’+dx’y’• The four neighbors located at (xi, yi), with known
gray level vii i=1 and 2, then we have four different g y iiequations as
vii=a+bxi+cyi+d xi yi
• Solving the above four equations for the four parameters, a, b, c, and d.
Image Comm. Lab EE/NTHU 136
5.12 Geometric Transformation5.12 Geometric Transformation
2010/10/10
69
Image Comm. Lab EE/NTHU 137
5.12 5.12 Geometric TransformationGeometric Transformation--graygray--level interpolationlevel interpolation
• resamplingInput Samples Output samples
Spatial Transformation
Output Grid
Image Reconstruction
Resampling Grid
Reconstructed Signal
Image Comm. Lab EE/NTHU 138
5.12 5.12 Geometric TransformationGeometric Transformation--graygray--level interpolationlevel interpolation
• resamplingf(u)
uDiscrete Input Discrete output
g(x)
x
b( )Sample s(x)
f (u)c g (x)c
u xRecostructed Input
Warping Prefiltering
x=T(u) h(x)
Reconstructb(x)p ( )
Warped Input Continuous Output
g (x)c'
x
2010/10/10
70
Image Comm. Lab EE/NTHU 139
5.12 5.12 Geometric TransformationGeometric Transformation--graygray--level interpolationlevel interpolation
Ideal warping resampling
c
cc
dttxhjtTbjf
dttxhtTf
Zxh(x(x)gxgxg
)())(()(
)())((
for ) )( )(
1
1
Zj
Zj
jxjf ),()(=
dttxhjtTbjx )())((),( 1where
Image Comm. Lab EE/NTHU 140
5.12 5.12 Geometric TransformationGeometric Transformation--graygray--level interpolationlevel interpolation
Table : Elements of ideal resampling.
f u u Z( ),
f u f u b u f j b u jcj Z
( ) ( )* ( ) ( ) ( )
1
Stage Mathematical definition
Discrete Input
Reconstructed Input
Warped Signal g x f T xc c( ) ( ( )) 1
dttxhtgxhxgxg ccc )()()(*)()(
g x g x s xc( ) ' ( ) ( )
Warped Signal
Continuous Output
Discrete Output
2010/10/10
71
Image Comm. Lab EE/NTHU 141
5.12 5.12 Geometric TransformationGeometric Transformation--graygray--level level interpolationinterpolation
• Cubic convolution interpolation:using much larger number of neighbors (i e 16) to obtain alarger number of neighbors (i.e., 16) to obtain a smoother interpolation.
• Ideal Interpolation:
Reconstruction
Filter
Warped
PrefilterSampler
f(u) f (u)c g (u)c' g(x)
b(u) h(u)
Filter Prefilter
WarpResampling Filter
s(T (x))-1
s(x)
Image Comm. Lab EE/NTHU 142
5.12 Geometric Transformation5.12 Geometric Transformation