The 8-point algorithm 16-385 Computer Vision (Kris Kitani) Carnegie - - PowerPoint PPT Presentation

the 8 point algorithm
SMART_READER_LITE
LIVE PREVIEW

The 8-point algorithm 16-385 Computer Vision (Kris Kitani) Carnegie - - PowerPoint PPT Presentation

The 8-point algorithm 16-385 Computer Vision (Kris Kitani) Carnegie Mellon University Fundamental Matrix Estimation Given a set of matched image points { x i , x 0 i } Estimate the Fundamental Matrix 0> F x Whats the relationship between


slide-1
SLIDE 1

The 8-point algorithm

16-385 Computer Vision (Kris Kitani)

Carnegie Mellon University

slide-2
SLIDE 2

Given a set of matched image points Estimate the Fundamental Matrix

Fundamental Matrix Estimation

{xi, x0

i}

0>Fx

What’s the relationship between F and x?

slide-3
SLIDE 3

Assume you have M point correspondences Each correspondence should satisfy

x0>

m Fxm = 0

m = 1, . . . , M

How would you solve for the 3 x 3 F matrix?

{xm, x0

m}

slide-4
SLIDE 4

Assume you have M point correspondences Each correspondence should satisfy

x0>

m Fxm = 0

m = 1, . . . , M

How would you solve for the 3 x 3 F matrix?

{xm, x0

m}

S V D

slide-5
SLIDE 5

Assume you have M point correspondences Each correspondence should satisfy

x0>

m Fxm = 0

m = 1, . . . , M

How would you solve for the 3 x 3 F matrix?

{xm, x0

m}

S V D

slide-6
SLIDE 6

Assume you have M point correspondences Each correspondence should satisfy

x0>

m Fxm = 0

m = 1, . . . , M

How would you solve for the 3 x 3 F matrix?

{xm, x0

m}

S V D

slide-7
SLIDE 7

Assume you have M point correspondences Each correspondence should satisfy

x0>

m Fxm = 0

m = 1, . . . , M

How would you solve for the 3 x 3 F matrix?

{xm, x0

m}

Set up a homogeneous linear system with 9 unknowns

slide-8
SLIDE 8

x0>

m Fxm = 0

⇥ x0

m

y0

m

1 ⇤ 2 4 f1 f2 f3 f4 f5 f6 f7 f8 f9 3 5 2 4 xm ym 1 3 5 = 0

How many equation do you get from one correspondence?

slide-9
SLIDE 9

xmx0

mf1 + xmy0 mf2 + xmf3+

ymx0

mf4 + ymy0 mf5 + ymf6+

x0

mf7 + y0 mf8 + f9 = 0

⇥ x0

m

y0

m

1 ⇤ 2 4 f1 f2 f3 f4 f5 f6 f7 f8 f9 3 5 2 4 xm ym 1 3 5 = 0

ONE correspondence gives you ONE equation

slide-10
SLIDE 10

⇥ x0

m

y0

m

1 ⇤ 2 4 f1 f2 f3 f4 f5 f6 f7 f8 f9 3 5 2 4 xm ym 1 3 5 = 0

   x1x0

1

x1y0

1

x1 y1x0

1

y1y0

1

y1 x0

1

y0

1

1 . . . . . . . . . . . . . . . . . . . . . . . . . . . xMx0

M

xMy0

M

xM yMx0

M

yMy0

M

yM x0

M

y0

M

1                  f1 f2 f3 f4 f5 f6 f7 f8 f9               = 0

Set up a homogeneous linear system with 9 unknowns How many equations do you need?

slide-11
SLIDE 11

Each point pair (according to epipolar constraint) contributes only one scalar equation

x0>

m Fxm = 0

Note: This is different from the Homography estimation where each point pair contributes 2 equations.

slide-12
SLIDE 12

Each point pair (according to epipolar constraint) contributes only one scalar equation

x0>

m Fxm = 0

Note: This is different from the Homography estimation where each point pair contributes 2 equations.

We need at least 8 points

Hence, the 8 point algorithm!

slide-13
SLIDE 13

How do you solve a homogeneous linear system?

AX = 0

slide-14
SLIDE 14

How do you solve a homogeneous linear system? minimize subject to kAxk2 kxk2 = 1

AX = 0

Total Least Squares

slide-15
SLIDE 15

How do you solve a homogeneous linear system? minimize subject to kAxk2 kxk2 = 1

AX = 0

Total Least Squares

SVD!

slide-16
SLIDE 16

How do you solve a homogeneous linear system? minimize subject to kAxk2 kxk2 = 1

AX = 0

Total Least Squares

SVD!

slide-17
SLIDE 17

How do you solve a homogeneous linear system? minimize subject to kAxk2 kxk2 = 1

AX = 0

Total Least Squares

SVD!

slide-18
SLIDE 18

Eight-Point Algorithm

  • 0. (Normalize points)
  • 1. Construct the M x 9 matrix A
  • 2. Find the SVD of ATA
  • 3. Entries of F are the elements of column of

V corresponding to the least singular value

  • 4. (Enforce rank 2 constraint on F)
  • 5. (Un-normalize F)
slide-19
SLIDE 19

Example

slide-20
SLIDE 20

epipolar lines

slide-21
SLIDE 21

x =   343.53 221.70 1.0   F =   −0.00310695 −0.0025646 2.96584 −0.028094 −0.00771621 56.3813 13.1905 −29.2007 −9999.79   l0 = Fx =   0.0295 0.9996 −265.1531  

slide-22
SLIDE 22

l0 = Fx =   0.0295 0.9996 −265.1531  

slide-23
SLIDE 23

Where is the epipole?

How would you compute it?

slide-24
SLIDE 24

Fe = 0

The epipole is in the right null space of F

How would you solve for the epipole?

(hint: this is a homogeneous linear system)

slide-25
SLIDE 25

Fe = 0

The epipole is in the right null space of F

How would you solve for the epipole?

(hint: this is a homogeneous linear system)

SVD!

slide-26
SLIDE 26

Fe = 0

The epipole is in the right null space of F

How would you solve for the epipole?

(hint: this is a homogeneous linear system)

SVD!

slide-27
SLIDE 27

Fe = 0

The epipole is in the right null space of F

How would you solve for the epipole?

(hint: this is a homogeneous linear system)

SVD!

slide-28
SLIDE 28

>> [u,d] = eigs(F’ * F) u =

  • 0.0013 0.2586 -0.9660

0.0029 -0.9660 -0.2586 1.0000 0.0032 -0.0005 d = 1.0e8*

  • 1.0000 0 0

0 -0.0000 0 0 0 -0.0000

eigenvalue eigenvectors

slide-29
SLIDE 29

>> [u,d] = eigs(F’ * F) u =

  • 0.0013 0.2586 -0.9660

0.0029 -0.9660 -0.2586 1.0000 0.0032 -0.0005 d = 1.0e8*

  • 1.0000 0 0

0 -0.0000 0 0 0 -0.0000

eigenvalue eigenvectors

slide-30
SLIDE 30

>> [u,d] = eigs(F’ * F) u =

  • 0.0013 0.2586 -0.9660

0.0029 -0.9660 -0.2586 1.0000 0.0032 -0.0005 d = 1.0e8*

  • 1.0000 0 0

0 -0.0000 0 0 0 -0.0000 >> uu = u(:,3) ( -0.9660 -0.2586 -0.0005)

Eigenvector associated with smallest eigenvalue eigenvalue eigenvectors

slide-31
SLIDE 31

>> [u,d] = eigs(F’ * F) u =

  • 0.0013 0.2586 -0.9660

0.0029 -0.9660 -0.2586 1.0000 0.0032 -0.0005 d = 1.0e8*

  • 1.0000 0 0

0 -0.0000 0 0 0 -0.0000 >> uu = u(:,3) ( -0.9660 -0.2586 -0.0005) >> uu / uu(3) (1861.02 498.21 1.0)

Eigenvector associated with smallest eigenvalue Epipole projected to image coordinates eigenvalue eigenvectors

slide-32
SLIDE 32

>> uu / uu(3) (1861.02 498.21 1.0)

Epipole projected to image coordinates

this is where the

  • ther picture is

being taken

slide-33
SLIDE 33