Affine Structure-from-Motion: Understanding Two Frames and Transformations - Prof. David J, Exams of Computer Science

The concept of affine structure-from-motion, focusing on two frames and the transformations involved. It covers topics like weak perspective, perspective-n-point, and affine transformation, as well as the limitations of determining the exact 3d structure of a scene. It also discusses the use of matrices and their role in solving for motion and structure.

Typology: Exams

Pre 2010

Uploaded on 07/29/2009

koofers-user-ze2
koofers-user-ze2 🇺🇸

10 documents

1 / 35

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Structure-from-Motion
Determining the 3-D structure of the world, and/or the
motion of a camera using a sequence of images
taken by a moving camera.
Equivalently, we can think of the world as moving and the
camera as fixed.
Like stereo, but the position of the camera isn’t
known (and it’s more natural to use many images
with little motion between them, not just two with a lot
of motion).
We may or may not assume we know the parameters of the
camera, such as its focal length.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23

Partial preview of the text

Download Affine Structure-from-Motion: Understanding Two Frames and Transformations - Prof. David J and more Exams Computer Science in PDF only on Docsity!

Structure-from-Motion

-^

Determining the 3-D structure of the world, and/or themotion of a camera using a sequence of imagestaken by a moving camera.^ – Equivalently, we can think of the world as moving and the

camera as fixed.

-^

Like stereo, but the position of the camera isn’tknown (and it’s more natural to use many imageswith little motion between them, not just two with a lotof motion).^ – We may or may not assume we know the parameters of the

camera, such as its focal length.

Structure-from-Motion

  • As with stereo, we can divide problem:
    • Correspondence.– Reconstruction.
      • Again, we’ll talk about reconstruction

first.^ – So for the next few classes we assume that

each image contains some points, and weknow which points match which.

Movie

Reconstruction

  • A lot harder than with stereo.• Start with simpler case: scaled

orthographic projection (weakperspective).^ – Recall, in this we remove the z coordinate

and scale all x and y coordinates the sameamount.

Perspective -> Scaled

Orthographic

  • Recall: (

xi

,y

,zi

) -> (xi

/zi

, yi

/zi

)i

  • Let

Z = (z

+z 1

2

+ …+z

)/nn

  • Then, (

xi

,y

,zi

) approx-> (xi

/Z, yi

/Z)i

The Equation of Weak

Perspective

) , ( ) , ,

(^

y x s z y x

-^ s

is constant for all points.

  • Parallel lines no longer converge, they remainparallel.

           

  

     

1 0 0

0

0 0 0

X Y^ Z

s s

x y

First: Represent motion

-^

We’ll talk about a fixed camera, and moving object.

-^

Key point:

     

    

1

1 1

. . . 2 1

2 1

2 1

n n z n

z z

y

y y

x

x x

P

Points

=^
x ty
s
s
s
t
s
s
s
S^

(^3) , 2

(^2) , 2

(^1) , 2

(^3) , 1

(^2) , 1

(^1) , 1 Some matrix

  

  

n v n

v v

u

u u I

2 1

2 1

. . .

The image

SP

I

Then:

Remember what this means.• We are representing moving a set of points,projecting them into the image, and scaling them.• Matrix multiplication: take inner product betweeneach row of S and each point. First row of Sproduces X coordinates, while second row producesY. • Projection occurs because S has no third row.• Translation occurs with tx and ty.• Scaling can be encoded with a scale factor in S.• The rest of S must be allowing the object to rotate.

Structure-from-Motion

  • S encodes:
    • Projection: only two lines– Scaling, since S can have a scale factor.– Translation, by tx/s and ty/s.– Rotation:

SP

I

Rotation

P

r

r

r

r

r

r

r

r

r

    

    

(^3) , 3

(^2) , 3

(^1) , 3

(^3) , 2

(^2) , 2

(^1) , 2

(^3) , 1

(^2) , 1

(^1) , 1

Represents a3D rotation ofthe points in P.

Why does multiplying points by R rotate them?• Think of the rows of R as a new coordinate system.Taking inner products of each points with these expressesthat point in that coordinate system.

  • This means rows of R must be orthonormal vectors(orthogonal unit vectors).
    • Think of what happens to the points (1,0) and (0,1). Theygo to (cos theta, -sin theta), and (sin theta, cos theta). Theyremain orthonormal, and rotate clockwise by theta.
      • Any other point, (a,b) can be thought of as a(1,0) +b(0,1). R(a(1,0)+b(0,1) = Ra(1,0) + Ra(0,1) = aR(1,0) +bR(0,1).

So it’s in the same position relative to the

rotated coordinates that it was in before rotation relativeto the x, y coordinates. That is, it’s rotated.

Simple 3D Rotation

    

      

    

n n z n

z

z

y

y

y

x

x

x

2

1

2

1

2

1

... 1 0 0

0

cos

sin

0

sin

cos

θ

θ

θ

θ Rotation about z axis.Rotates x,y coordinates. Leaves z coordinates fixed.

  • Intuitively, it makes sense that 3D rotations can beexpressed as 3 separate rotations about fixed axes.Rotations have 3 degrees of freedom; two describe anaxis of rotation, and one the amount.• Rotations preserve the length of a vector, and the anglebetween two vectors. Therefore, (1,0,0), (0,1,0), (0,0,1)must be orthonormal after rotation. After rotation, theyare the three columns of R. So these columns must beorthonormal vectors for R to be a rotation. Similarly, ifthey are orthonormal vectors (with determinant 1) R willhave the effect of rotating (1,0,0), (0,1,0), (0,0,1). Samereasoning as 2D tells us all other points rotate too.
    • Note if R has determinant -1, then R is a rotationplus a reflection.

Questions?