the 8 point algorithm
play

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


  1. The 8-point algorithm 16-385 Computer Vision (Kris Kitani) Carnegie Mellon University

  2. Fundamental Matrix Estimation Given a set of matched image points { x i , x 0 i } Estimate the Fundamental Matrix 0> F x What’s the relationship between F and x?

  3. Assume you have M point correspondences { x m , x 0 m } m = 1 , . . . , M Each correspondence should satisfy x 0> m F x m = 0 How would you solve for the 3 x 3 F matrix?

  4. Assume you have M point correspondences { x m , x 0 m } m = 1 , . . . , M Each correspondence should satisfy x 0> m F x m = 0 How would you solve for the 3 x 3 F matrix? S V D

  5. Assume you have M point correspondences { x m , x 0 m } m = 1 , . . . , M Each correspondence should satisfy x 0> m F x m = 0 How would you solve for the 3 x 3 F matrix? S V D

  6. Assume you have M point correspondences { x m , x 0 m } m = 1 , . . . , M Each correspondence should satisfy x 0> m F x m = 0 How would you solve for the 3 x 3 F matrix? S V D

  7. Assume you have M point correspondences { x m , x 0 m } m = 1 , . . . , M Each correspondence should satisfy x 0> m F x m = 0 How would you solve for the 3 x 3 F matrix? Set up a homogeneous linear system with 9 unknowns

  8. x 0> m F x m = 0 2 3 2 3 f 1 f 2 f 3 x m ⇥ x 0 5 = 0 1 ⇤ y 0 f 4 f 5 f 6 y m 4 5 4 m m f 7 f 8 f 9 1 How many equation do you get from one correspondence?

  9. 2 3 2 3 f 1 f 2 f 3 x m ⇥ x 0 5 = 0 1 ⇤ y 0 f 4 f 5 f 6 y m 4 5 4 m m f 7 f 8 f 9 1 ONE correspondence gives you ONE equation x m x 0 m f 1 + x m y 0 m f 2 + x m f 3 + y m x 0 m f 4 + y m y 0 m f 5 + y m f 6 + x 0 m f 7 + y 0 m f 8 + f 9 = 0

  10. 2 3 2 3 f 1 f 2 f 3 x m ⇥ x 0 5 = 0 1 ⇤ y 0 f 4 f 5 f 6 y m 4 5 4 m m f 7 f 8 f 9 1 Set up a homogeneous linear system with 9 unknowns   f 1 f 2     f 3     x 1 x 0 x 1 y 0 y 1 x 0 y 1 y 0 x 0 y 0 x 1 y 1 1   f 4 1 1 1 1 1 1   . . . . . . . . .   . . . . . . . . . f 5 = 0   . . . . . . . . .       f 6 x M x 0 x M y 0 y M x 0 y M y 0 x 0 y 0 x M y M 1   M M M M M M   f 7     f 8   f 9 How many equations do you need?

  11. Each point pair (according to epipolar constraint) contributes only one scalar equation x 0> m F x m = 0 Note: This is different from the Homography estimation where each point pair contributes 2 equations.

  12. Each point pair (according to epipolar constraint) contributes only one scalar equation x 0> m F x m = 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!

  13. How do you solve a homogeneous linear system? A X = 0

  14. How do you solve a homogeneous linear system? A X = 0 Total Least Squares k A x k 2 minimize k x k 2 = 1 subject to

  15. How do you solve a homogeneous linear system? A X = 0 Total Least Squares k A x k 2 minimize k x k 2 = 1 subject to SVD!

  16. How do you solve a homogeneous linear system? A X = 0 Total Least Squares k A x k 2 minimize k x k 2 = 1 subject to SVD!

  17. How do you solve a homogeneous linear system? A X = 0 Total Least Squares k A x k 2 minimize k x k 2 = 1 subject to SVD!

  18. Eight-Point Algorithm 0. (Normalize points) 1. Construct the M x 9 matrix A 2. Find the SVD of A T A 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)

  19. Example

  20. epipolar lines

  21.   − 0 . 00310695 − 0 . 0025646 2 . 96584 F = − 0 . 028094 − 0 . 00771621 56 . 3813   13 . 1905 − 29 . 2007 − 9999 . 79   343 . 53 x = 221 . 70   1 . 0 l 0 = F x   0 . 0295 0 . 9996 =   − 265 . 1531

  22. l 0 = F x   0 . 0295 0 . 9996 =   − 265 . 1531

  23. Where is the epipole? How would you compute it?

  24. F e = 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)

  25. F e = 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!

  26. F e = 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!

  27. F e = 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!

  28. >> [u,d] = eigs(F’ * F) eigenvectors u = -0.0013 0.2586 -0.9660 0.0029 -0.9660 -0.2586 1.0000 0.0032 -0.0005 eigenvalue d = 1.0e8* -1.0000 0 0 0 -0.0000 0 0 0 -0.0000

  29. >> [u,d] = eigs(F’ * F) eigenvectors u = -0.0013 0.2586 -0.9660 0.0029 -0.9660 -0.2586 1.0000 0.0032 -0.0005 eigenvalue d = 1.0e8* -1.0000 0 0 0 -0.0000 0 0 0 -0.0000

  30. >> [u,d] = eigs(F’ * F) eigenvectors u = -0.0013 0.2586 -0.9660 0.0029 -0.9660 -0.2586 1.0000 0.0032 -0.0005 eigenvalue d = 1.0e8* -1.0000 0 0 0 -0.0000 0 0 0 -0.0000 >> uu = u(:,3) Eigenvector associated with ( -0.9660 -0.2586 -0.0005) smallest eigenvalue

  31. >> [u,d] = eigs(F’ * F) eigenvectors u = -0.0013 0.2586 -0.9660 0.0029 -0.9660 -0.2586 1.0000 0.0032 -0.0005 eigenvalue d = 1.0e8* -1.0000 0 0 0 -0.0000 0 0 0 -0.0000 >> uu = u(:,3) Eigenvector associated with ( -0.9660 -0.2586 -0.0005) smallest eigenvalue >> uu / uu(3) Epipole projected to image coordinates (1861.02 498.21 1.0)

  32. this is where the other picture is being taken >> uu / uu(3) Epipole projected to image coordinates (1861.02 498.21 1.0)

Recommend


More recommend