Triangulation 16-385 Computer Vision (Kris Kitani) Carnegie Mellon - - PowerPoint PPT Presentation

triangulation
SMART_READER_LITE
LIVE PREVIEW

Triangulation 16-385 Computer Vision (Kris Kitani) Carnegie Mellon - - PowerPoint PPT Presentation

Triangulation 16-385 Computer Vision (Kris Kitani) Carnegie Mellon University Structure Motion Measurements (scene geometry) (camera geometry) 3D to 2D estimate Pose Estimation known correspondences 2D to 2D estimate Triangulation


slide-1
SLIDE 1

Triangulation

16-385 Computer Vision (Kris Kitani)

Carnegie Mellon University

slide-2
SLIDE 2

Structure

(scene geometry)

Motion

(camera geometry)

Measurements Pose Estimation

known

estimate

3D to 2D correspondences

Triangulation

estimate

known 2D to 2D coorespondences

Reconstruction

estimate estimate

2D to 2D coorespondences

slide-3
SLIDE 3

Triangulation

x

x0

image 2 image 1

Given

slide-4
SLIDE 4

Triangulation

x

x0 C

C0

image 2 image 1

Find 3D object point

Will the lines intersect?

slide-5
SLIDE 5

Triangulation

x

x0 C

C0

image 2 image 1

Find 3D object point

(no single solution due to noise)

slide-6
SLIDE 6

Given a set of (noisy) matched points and camera matrices Estimate the 3D point

Triangulation

{xi, x0

i}

P, P0

X

slide-7
SLIDE 7

x = PX

known known

Can we compute X from a single correspondence x?

slide-8
SLIDE 8

camera center

X

image plane

x x y z

z = f

infinitely many 3D points along the ray no unique 3D point

slide-9
SLIDE 9

x = PX

known known

Can we compute X from two correspondences x and x’?

slide-10
SLIDE 10

x = PX

known known

Can we compute X from two correspondences x and x’? yes if perfect measurements

slide-11
SLIDE 11

x = PX

There will not be a point that satisfies both constraints because the measurements are usually noisy

known known

x0 = P0X

x = PX

Need to find the best fit Can we compute X from two correspondences x and x’? yes if perfect measurements

slide-12
SLIDE 12

x = PX

Also, this is a similarity relation because it involves homogeneous coordinates

x = αPX

Same ray direction but differs by a scale factor

  x y z   = α   p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12       X Y Z 1    

How do we solve for unknowns in a similarity relation?

(inhomogeneous coordinate) (homogeneous coordinate)

slide-13
SLIDE 13

  x y z   = α   p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12       X Y Z 1    

How do we solve for unknowns in a similarity relation?

Direct Linear Transform

Remove scale factor, convert to linear system and solve with SVD.

x = PX

Also, this is a similarity relation because it involves homogeneous coordinates

x = αPX

Same ray direction but differs by a scale factor

(inhomogeneous coordinate) (homogeneous coordinate)

slide-14
SLIDE 14

  x y z   = α   p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12       X Y Z 1    

How do we solve for unknowns in a similarity relation?

Direct Linear Transform

Remove scale factor, convert to linear system and solve with SVD.

x = PX

Also, this is a similarity relation because it involves homogeneous coordinates

x = αPX

Same ray direction but differs by a scale factor

(inhomogeneous coordinate) (homogeneous coordinate)

slide-15
SLIDE 15

x = αPX

Same direction but differs by a scale factor

x × PX = 0

Cross product of two vectors of same direction is zero (this equality removes the scale factor)

slide-16
SLIDE 16

Recall: Cross Product

a b c = a × b c · a = 0 c · b = 0

Vector (cross) product 
 takes two vectors and returns a vector perpendicular to both

a × b =   a2b3 − a3b2 a3b1 − a1b3 a1b2 − a2b1  

cross product of two vectors in the same direction is zero

a × a = 0

remember this!!!

slide-17
SLIDE 17

  x y z   = α   p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12       X Y Z 1       x y z   = α   —– p>

1 —–

—– p>

2 —–

—– p>

3 —–

    X     x y z   = α   p>

1 X

p>

2 X

p>

3 X

 

slide-18
SLIDE 18

  x y z   = α   p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12       X Y Z 1       x y z   = α   —– p>

1 —–

—– p>

2 —–

—– p>

3 —–

    X     x y z   = α   p>

1 X

p>

2 X

p>

3 X

 

  x y 1   ×   p>

1 X

p>

2 X

p>

3 X

  =   yp>

3 X − p> 2 X

p>

1 X − xp> 3 X

xp>

2 X − yp> 1 X

  =    

slide-19
SLIDE 19

  x y 1   ×   p>

1 X

p>

2 X

p>

3 X

  =   yp>

3 X − p> 2 X

p>

1 X − xp> 3 X

xp>

2 X − yp> 1 X

  =    

x × PX = 0

Using the fact that the cross product should be zero Third line is a linear combination of the first and second lines. (x times the first line plus y times the second line) One 2D to 3D point correspondence give you 2 equations

slide-20
SLIDE 20

  x y 1   ×   p>

1 X

p>

2 X

p>

3 X

  =   yp>

3 X − p> 2 X

p>

1 X − xp> 3 X

xp>

2 X − yp> 1 X

  =    

x × PX = 0

Third line is a linear combination of the first and second lines. (x times the first line plus y times the second line) One 2D to 3D point correspondence give you 2 equations Using the fact that the cross product should be zero

slide-21
SLIDE 21

Now we can make a system of linear equations (two lines for each 2D point correspondence)

 yp>

3 X − p> 2 X

p>

1 X − xp> 3 X

  • =

 0

  •  yp>

3 − p> 2

p>

1 − xp> 3

  • X =

 0

  • AiX = 0
slide-22
SLIDE 22

AX = 0

How do we solve homogeneous linear system? Concatenate the 2D points from both images

    yp>

3 − p> 2

p>

1 − xp> 3

y0p0>

3 − p0> 2

p0>

1 − x0p0> 3

    X =        

sanity check! dimensions?

slide-23
SLIDE 23

AX = 0

How do we solve homogeneous linear system? Concatenate the 2D points from both images

S V D !

    yp>

3 − p> 2

p>

1 − xp> 3

y0p0>

3 − p0> 2

p0>

1 − x0p0> 3

    X =        

slide-24
SLIDE 24

AX = 0

How do we solve homogeneous linear system? Concatenate the 2D points from both images

S V D !

    yp>

3 − p> 2

p>

1 − xp> 3

y0p0>

3 − p0> 2

p0>

1 − x0p0> 3

    X =        

slide-25
SLIDE 25

AX = 0

How do we solve homogeneous linear system? Concatenate the 2D points from both images

S V D !

    yp>

3 − p> 2

p>

1 − xp> 3

y0p0>

3 − p0> 2

p0>

1 − x0p0> 3

    X =        

slide-26
SLIDE 26

AX = 0

How do we solve homogeneous linear system? Concatenate the 2D points from both images

S V D !

    yp>

3 − p> 2

p>

1 − xp> 3

y0p0>

3 − p0> 2

p0>

1 − x0p0> 3

    X =        

slide-27
SLIDE 27

Recall: Total least squares

(matrix form) (Warning: change of notation. x is a vector of parameters!)

ETLS = X

i

(aix)2 = kAxk2

kxk2 = 1

constraint

kAxk2 kxk2 minimize subject to kAxk2 kxk2 = 1 minimize Solution is the eigenvector corresponding to smallest eigenvalue of

A>A

(Rayleigh quotient)

slide-28
SLIDE 28

Structure

(scene geometry)

Motion

(camera geometry)

Measurements Pose Estimation

known

estimate

3D to 2D correspondences

Triangulation

estimate

known 2D to 2D coorespondences

Reconstruction

estimate estimate

2D to 2D coorespondences