Вы находитесь на странице: 1из 48

3D Motion Estimation

3D model construction

3D model construction

Video Manipulation

Visual Motion
Allows us to compute useful properties of
the 3D world, with very little knowledge.
Example: Time to collision

Time to Collision
v

l(t)

t
Do
D(t)

L
t=0

An object of height L moves with


constant velocity v:
At time t=0 the object is at:
D(0) = Do
At time t it is at
D(t) = Do vt
It will crash with the camera at
time:
D() = Do v = 0
= Do/v

Time to Collision
The image of the object has size l(t):

l(t)

t
Do
D(t)

L
t=0

Taking derivative wrt time:

Time to Collision
v

l(t)

t
Do
D(t)

L
t=0
And their ratio is:

Time to Collision
Can be
directly
measured
from image

l(t)

t
Do

L
t=0
And time to collision:

D(t)
Can be found, without knowing L or Do or v !!

Structure from Motion


Z

u u tr u rot
u

t,

u tr

u rot

1
z r r
F

Passive Navigation and Structure


from Motion

The system moves with a rigid motion with translational velocity


t t x ,t y , t z and rotational velocity x y z .
T

Scene points R X , Y , Z project onto image points r x, y, f


T

V , V , V of a scene point is observed in the image


and the 3D velocity R
x
y
z
as velocity r u , v.0.

Consider a 3D point P and its image:


P
p
f

Using pinhole camera equation:

V
v
p
f

Let things move:


P

The relative velocity of P wrt camera:

Translation
velocity

Rotation
angular
velocity

3D
Relative
Velocity:
V
P

v
p
f

The relative velocity of P wrt camera:

Motion
Field:
the
velocity
of
p
V
P

v
p
f

Taking derivative wrt time:


Z

Motion
Field:
the
velocity
of
p
V
P

v
p
f

Motion
Field:
the
velocity
of
p
V
P

v
p
f

Motion
Field:
the
velocity
of
p
V
Translational
component

v
p
f

Scaling ambiguity
(t and Z can only
be derived up to a scale
Factor)

Motion
Field:
the
velocity
of
p
V
Rotational
component

v
p
f

NOTE: The rotational component is independent of depth Z !

Translational flow field

ty
tx
where p o x0 , y0 f , f is the focus of expansion (FOE)
tz
tz
or focus of contraction (FOC).

Rotational flow field

x y

f,
f is the point where the rotation axis pierces the image plane (AOR).
z z

Pure Translation
What if tz 0 ?

All motion field vectors are parallel to each other and


inversely proportional to depth !

Pure Translation:
Properties of the MF
If tz 0 the MF is RADIAL with all vectors pointing
towards (or away from) a single point po. If tz = 0
the MF is PARALLEL.
The length of the MF vectors is inversely
proportional to depth Z. If tz 0 it is also directly
proportional to the distance between p and po.

Pure Translation:
Properties of the MF
po is the vanishing point of the direction of
translation.
po is the intersection of the ray parallel to
the translation vector and the image plane.

Special Case: Moving Plane


V
v
p
f

Planar surfaces are common


in man-made environments

Question: How does the MF of a moving plane look like?

Special Case: Moving Plane


Points on the plane must satisfy the
equation describing the plane.

X
n
d
Y

Let

P
Z

n be the unit vector normal to the plane.


d be the distance from the plane to the
origin.
NOTE: If the plane is moving wrt
camera, n and d are functions of time.

Then:
where

Special Case: Moving Plane


X

Let

be the image of P

n
d
Y

Using the pinhole


projection equation:

P
p

Using the plane equation:


Solving for Z:

Special Case: Moving Plane


X

Now consider the MF equations:

n
d
Y

And Plug in:

Special Case: Moving Plane


X

The MF equations become:

n
d
Y

where

P
Z

Special Case: Moving Plane


X

MF equations:

n
d
Y

P
Z

Q: What is the significance of this?


A: The MF vectors are given by low order (second)
polynomials.

Their coeffs. a1 to a8 (only 8 !) are functions of n, d, t and .


The same coeffs. can be obtained with a different plane and
relative velocity.

Moving Plane:
Properties of the MF
The MF of a planar surface is at any time a
quadratic function in the image coordinates.
A plane nTP=d moving with velocity V=-t- P
has the same MF than a plane with normal n=t/|t| ,
distance d and moving with velocity
V=|t|n ( + n t/d) P

Classical Structure from Motion


Established approach is the epipolar
minimization: The derotated flow should
be parallel to the translational flow.
E

-urot

utr

-urot

utr

The Translational Case


(a least squares formulation)

xt z t x
v
Z

|| f ( x, y ) ||

dx dy min

2
(
f
(
x
,
y
)
)
dx dy

Substitute t x xt z
2

Z Z

yt z t y

t y yt z

We minimize d 2

min

Step 1 : Minimize with respect to Z . (Find the length of u tr for which d


would be minimized.)

2
2 0
Z Z
Z Z

Substitute back

u v 2 dx dy min
2 2

2 2
Z
u v

Step 2: Differentiate with respect to tx, ty, tz, set expression to zero.

u v u v
Let K

2 2

I t y yt z K dx dy 0

II t x xt z K dx dy 0

III yt x xt y K dx dy 0

3 linearly dependent equations t x I t y II t z III 0

Equations are nonlinear in tx, ty, tz

Using a different norm


2

yt z t y

xt z t x
( 2 2 ) dx dy min
u
v
Z
Z

|| f ( x, y ) || , f ( x, y ) 2 ( 2 2 ) dx dy
First, differentiate integrand with respect to Z and set to zero
a

u 2 v 2 0
Z Z
Z Z

dx dy min

g (t x , t y , t z )

2 2
Z
u v

g (t x , t y , t z ) at x2 bt y2 ct z2 2dt x t y 2et y t z 2 ft x t z
where

a v 2 dx dy,
b u 2 dx dy,
c ( xv yu ) dx dy,
d uv dx dy,
e u ( xv yu ) dx dy,
f v( xv yu ) dx dy,

Differentiate g( tx, ty, tz ) with respect to tx, ty, tz and set to zero

Gt 0
a

G d
f

with||t|| 1
d
b
e

e
c

Solution is singular vector corresponding to


smallest singular value

The Rotational Case


Let f=1

2
2

v
min
rot
rot

u x xy y x 2 1 z y 0

v x y 2 1 y xy z x 0

xy
2
y f

In matrix form

x f
xy
2

x
u
y
y
v
x

A u

A A AT u
T

The General Case


Minimization of epipolar distance

u u rot

v vrot

v tr

u tr

dx dy min

or, in vector notation


2

r
r

r
dr min

Motion Parallax
The difference in motion between two very
close points does not depend on rotation.
Can be used at depth discontinuities to obtain
the direction of translation.

FOE

Motion Parallax
u (u, v) u tr u rot
At points p1 and p 2 ( x, y ) we have
u1 , rot u 2 , rot
utr u1,tr u2,tr

1
1
( x xo )( )
Z1 Z 2

vtr v1,tr v2,tr

1
1
( y yo )( )
Z1 Z 2

v y y0

u x x0

Vectors perpendicular to
translational component
u
u u

tr

tr

( y y 0 , x x0 )
||( y y0 , x x0 )||

||( y y01, x x0 )|| ( y y0 )urot ( x x0 )vrot

Vector component perpendicular to translational component


is only due to rotation
rotation can be estimated from it.

Motion Estimation Techniques

Prazdny (1981), Burger Bhanu (1990), Nelson Aloimonos (1988), Heeger


Jepson (1992):

Decomposition of flow field into translational and rotational


components. Translational flow field is radial (all vectors are
emanating from (or pouring into) one point), rotational flow field is
quadratic in image coordinates.
Either search in the space of rotations: remainig flow field
should be translational. Translational flow field
is evaluated by minimizing deviation from radial field:
.

(v, u ) ( x x0 , y y0 ) 0

Or search in the space of directions of translation: Vectors


perpendicular to translation are due to rotation only

Motion Estimation Techniques


Longuet-Higgins Prazdny (1980), Waxman (1987):
Parametric model for local surface patches (planes or
quadrics) solve locally for motion parameters and
structure, because flow is linear in the motion parameters
(quadratic or higher order in the image coordinates)

Вам также может понравиться