Download - Lecture - University of Central Florida
1
Lecture
Computing Optical Flow
Horn&Schunck Optical Flow
0),,(
=∂
∂+
∂
∂+
∂
∂=
t
f
dt
dx
y
f
dt
dx
x
f
dt
tyxdf
brightness constancy eq0=++ tyx fvfuf
Sequence Image ),,( tyxf
2
Horn&Schunck Optical Flow
f x y t f x y tf
xdx
f
ydy
f
tdt( , , ) ( , , )= + + +
∂∂
∂∂
∂∂
Taylor Series),,(),,( dttdyydxxftyxf +++=
brightness constancy eq0=++ tyx fvfuf
0=++ dtfdyfdxf tyx
Interpretation of optical flow eq
y
t
y
x
f
fu
f
fv --=
df
f ft
x y
=+2 2
d=normal flowp=parallel flow
Equation of st.line
0=++ tyx fvfuf
3
Horn&Schunck (contd)
variational calculus{( ) ( )}ÚÚ + + + + + +f u f v f u u v v dxdyx y t x y x y
2 2 2 2 2l
( ) ( )
( ) (( )
f u f v f f u
f u f v f f v
x y t x
x y t y
+ + + =
+ + + =
l
l
D
D
2
2
0
0
( ) ( )
( ) (( )
f u f v f f u u
f u f v f f v vx y t x av
x y t y av
+ + + - =
+ + + - =
l
l
0
0
u u fP
D
v v fP
D
av x
av y
= -
= -
P f u f v f
D f f
x av y av t
x y
= + +
= + +l 2 2
discrete version
min
yyxx uuu +=D2
Algorithm-1
• k=0
• Initialize u vK K
u u fP
D
v v fP
D
Kavk
x
avK
y
= -
= -
-
-
1
1
P f u f v f
D f f
x av y av t
x y
= + +
= + +l 2 2
• Repeat until some error measure is satisfied(converges)
4
Derivative Masks
xf
image second11
11
imagefirst 11
11
˙˚
˘ÍÎ
È
-
-
˙˚
˘ÍÎ
È
-
-
yf
image second11
11
imagefirst 11
11
˙˚
˘ÍÎ
È --
˙˚
˘ÍÎ
È --
tf
image second11
11
imagefirst 11
11
˙˚
˘ÍÎ
È
˙˚
˘ÍÎ
È
--
--
Synthetic Images