Upload
dongoc
View
238
Download
0
Embed Size (px)
Citation preview
1
Page 1
Tracking Image Tracking Image dengandengan MetodeMetodefeature Lucasfeature Lucas--KanadeKanade
SumberSumber::
--Forsyth & Ponce Chap. 19Forsyth & Ponce Chap. 19
--TomashiTomashi, Lucas & , Lucas & KanadeKanade: : Good Feature to TrackGood Feature to Track
--StandfordStandford Vision & ModelingVision & Modeling
• Ulasan metode Lucas-Kanade + Implementasi dengan Matlab• Analisa metode Lucas-Kanade
• Support Maps / Layers:- Robust Norm- Layered Motion- Background Subtraction- Color Layers
AgendaAgenda
2
Page 2
-
Lucas-Kanade: Minimisasi fungsi: Image 1D
Intensitas
x
u ?F G
∑ −≈x
tx xFuxF 2))()((
∑ −+=x
xGuxFuE 2))()(()(
Linierisasi:
Spatial Gradient Temporal Gradient
∑∈
−++=ROIyx
xGvyuxFvuE,
2))(),((),(
∑∈
−+≈ROIyx
tyx yxFvyxFuyxF,
2)),(),(),((
Spatial Gradient Temporal Gradient
ROI
ROI
(u,v)
F G
Lucas-Kanade: Minimisasi fungsi: Image 2D
3
Page 3
Minimisasi fungsi E(u,v):
0
0
=∂∂
=∂∂
v
Eu
E
=
∑∑
∑∑∑∑
yt
xt
yyx
yxx
FF
FF
v
u
FFF
FFF2
2
=>
C
D
=
v
u
=
v
uC
-1
D
Lucas-Kanade: Minimisasi fungsi: Image 2D
• Step 0: Inisialisasi (dengan manual)
• Step 1: hitung: C dan D dan cari penyelesaian (u,v):
- Hitung image derivatives Fx,Fy,Ft
• Step 2: re-warp image G:
- Sub-pixel image interpolation
• Step 3: Loop:
- Ukur error / terminate
Impelementasi Lucas-Kanade
4
Page 4
• Step 1: hitung: C dan D dan cari penyelesaian (u,v):
- Hitung image derivatives Fx,Fy,Ft
A) Fx, Fy: Filter dengan Gaussian Derivative Kernel:
Impelementasi Lucas-Kanade
• Step 1: hitung: C dan D dan cari penyelesaian (u,v):
- Hitung image derivatives Fx,Fy,Ft
B) Ft: Finite Difference of Blurred F and G:
Impelementasi Lucas-Kanade
5
Page 5
• Step 1: hitung: C dan D dan cari penyelesaian
(u,v):
- Hitung image derivatives Fx,Fy,Ft
- Hitung dengan Gaussian kernel
(menggunakan coarse-to-fine strategy denganpengurangan sigma)
Impelementasi Lucas-Kanade
•Step 2: re-warp image G:
- Sub-pixel image interpolation
Impelementasi Lucas-Kanade
Operasi Warping gunakan fungsiinterp2 dari Matlab
6
Page 6
• Step 3: Loop:
- Ukur error / terminate
Impelementasi Lucas-Kanade
2|||| tFperhatikan:
AnalisaAnalisa GrafisGrafis metodemetode LucasLucas--KanadeKanade
7
Page 7
Minimisasi fungsi E(u,v):
0
0
=∂∂
=∂∂
v
Eu
E
=
∑∑
∑∑∑∑
yt
xt
yyx
yxx
FF
FF
v
u
FFF
FFF2
2
=>
C
D
=
v
u
=
v
uC
-1
D
Lucas-Kanade: problem singulariti
=
∑∑
∑∑∑∑
yt
xt
yyx
yxx
FF
FF
v
u
FFF
FFF2
2
Lucas-Kanade: problem singulariti
=
00
00C
Fx=0, Fy=0
8
Page 8
=
∑∑
∑∑∑∑
yt
xt
yyx
yxx
FF
FF
v
u
FFF
FFF2
2
Lucas-Kanade: problem singulariti
=
00
00C
Fx=0, Fy=0
=
00
0aC
Fy=0
=
∑∑
∑∑∑∑
yt
xt
yyx
yxx
FF
FF
v
u
FFF
FFF2
2
Lucas-Kanade: problem singulariti
=
00
00C
Fx=0, Fy=0
=
00
0aC
Fy=0
)0,1()( eCeig =
9
Page 9
Lucas-Kanade: Aperture Problem
=
00
00C
Fx=0, Fy=0
)0,1()( eCeig =
Lucas-Kanade: Aperture Problem
Bergen et al.
10
Page 10
∑∑∑∑
2
2
yyx
yxx
FFF
FFF
Aperture Problem: Bisa diatasi ???
)2,1()( eeCeig =
- Hindari sebisa mungkin !
- Gunakan nilai Eigenvalues untuk inisialisasi “Good Features”
(lihat paper “Good Features to track” Shi-Tomasi)
- Lokasi Good Feature berada pada: min(eig1,eig2) > a
Aperture Problem: Bisa diatasi ???
“Good Features” (Shi-Tomasi)
11
Page 11
∑∑∑∑
2
2
yyx
yxx
FFF
FFF
Aperture Problem: Bisa diatasi ???
)2,1()( eeCeig =
- coba di Hack !
- regularisasi C:
+=
λλ0
0CCreg
∑∑∑∑
2
2
yyx
yxx
FFF
FFF
Aperture Problem: Bisa diatasi ???
)2,1()( eeCeig =
-
- Simoncelli et al 1991:
12
Page 12
∑∑∑∑
2
2
yyx
yxx
FFF
FFF
Aperture Problem: Bisa diatasi ???
)2,1()( eeCeig =
- Tambah Aperture (window feature) !
- Coarse-to-fine Pyramids (Bergen et al, Simoncelli)
∑∑∑∑
2
2
yyx
yxx
FFF
FFF
Aperture Problem: Bisa diatasi ???
)2,1()( eeCeig =
- Tambah Aperture (window feature) !
- akibat: integrasi ROI lebih besar -> motion model jadi lebih komplex
13
Page 13
Pengembangan Lucas-Kanade secaraAffine
+
=
++
6
5
43
21
a
a
y
x
aa
aa
vy
ux
Affine Motion Model:
- 2D Translation- 2D Rotation- Scale in X / Y- Shear
Matlab demo ->
Pengembangan Lucas-Kanade secaraAffine
Affine Motion Model -> digunakan pada Lucas-Kanade:
Matlab demo ->
∑∈
−++=ROIyx
yxGvyuxFvuE,
2)),(),((),(
321 ayaxa ++ 654 ayaxa ++
D
a
a
C =
6
1
...
14
Page 14
• Support Maps / Layers:- Robust Norm- Layered Motion- Background Subtraction- Color Based Tracking
Support Maps / LayersSupport Maps / Layers
- L2 Norm vs Robust Norm
- Bahaya dari fitting secara least square:
Akibat adanya Outliers (gangguan pixel luar) menyebabkan square error menjadi sangat besar
15
Page 15
Support Maps / LayersSupport Maps / Layers
- L2 Norm vs Robust Norm
- Bahaya dari fitting secara least square:
L2
D
Support Maps / LayersSupport Maps / Layers
- L2 Norm vs Robust Norm
- Bahaya dari fitting secara least square:
L2 robust
D D
16
Page 16
Support Maps / LayersSupport Maps / Layers
- Robust Norm -- baik untuk menangani outliers
- nonlinear optimization
robust
D
Support Maps / LayersSupport Maps / Layers
- Black-Jepson-95
17
Page 17
Support Maps / LayersSupport Maps / Layers
- Layered Motion (Jepson/Black, Weiss/Adelson, …)
Support Maps / LayersSupport Maps / Layers
- Kasus spesial dari Layered Motion:
- Background substraction
- Outlier rejection (== robust norm)
- Kasus sederhana: Tiap Layer punya warna seragam
18
Page 18
Support Maps / LayersSupport Maps / Layers
- Color Layers:
P(skin | F(x,y))