structure from motion
play

Structure from Motion Computer Vision Jia-Bin Huang, Virginia Tech - PowerPoint PPT Presentation

Structure from Motion Computer Vision Jia-Bin Huang, Virginia Tech Many slides from S. Seitz, N Snavely, and D. Hoiem Administrative stuffs HW 3 due 11:55 PM, Oct 17 (Wed) Submit your alignment results! [Link] HW 2 will be out this


  1. Structure from Motion Computer Vision Jia-Bin Huang, Virginia Tech Many slides from S. Seitz, N Snavely, and D. Hoiem

  2. Administrative stuffs • HW 3 due 11:55 PM, Oct 17 (Wed) • Submit your alignment results! [Link] • HW 2 will be out this week

  3. Perspective and 3D Geometry • Projective geometry and camera models • Vanishing points/lines • x = 𝐋 𝐒 𝐮 𝐘 • Single-view metrology and camera calibration • Calibration using known 3D object or vanishing points • Measuring size using perspective cues • Photo stitching • Homography relates rotating cameras 𝐲′ = 𝐈𝐲 • Recover homography using RANSAC + normalized DLT • Epipolar Geometry and Stereo Vision • Fundamental/essential matrix relates two cameras 𝐲 ′ 𝐆𝐲 = 𝟏 • Recover 𝐆 using RANSAC + normalized 8-point algorithm, enforce rank 2 using SVD • Structure from motion (this class) • How can we recover 3D points from multiple images?

  4. Recap: Epipoles • Point x in the left image corresponds to epipolar line l’ in right image • Epipolar line passes through the epipole ( the intersection of the cameras’ baseline with the image plane

  5. Recap: Fundamental Matrix • Fundamental matrix maps from a point in one image to a line in the other • If x and x’ correspond to the same 3d point X:

  6. Recap: Automatic Estimation of F Assume we have matched points x x ’ with outliers 8-Point Algorithm for Recovering F • Correspondence Relation  Fx  x T 0 1. Normalize image coordinates ~ ~     x  x T x Tx 2. RANSAC with 8 points • Randomly sample 8 points • Compute F via least squares   ~  • det 0 Enforce F by SVD • Repeat and choose F with most inliers ~  3. De-normalize:  T F T F T

  7. This class: Structure from Motion • Projective structure from motion • Affine structure from motion • HW 3 • Fundamental matrix • Affine structure from motion • Multi-view stereo (optional)

  8. Structure [ ˈstrək (t) SHər ]: 3D Point Cloud of the Scene Motion [ ˈmōSH(ə)n ]: Camera Location and Orientation Structure from Motion (SfM) Get the Point Cloud from Moving Cameras

  9. SfM Applications – 3D Modeling http://www.3dcadbrowser.com/download.aspx?3dmodel=40454

  10. SfM Applications – Surveying cultural heritage structure analysis Guidi et al. High-accuracy 3D modeling of cultural heritage, 2004

  11. SfM Applications – Robot navigation and mapmaking https://www.youtube.com/watch?v=1HhOmF22oYA

  12. SfM Applications – Visual effect (matchmove) https://www.youtube.com/watch?v=bK6vCPcFkfk

  13. Steps Images  Points: Structure from Motion Points  More points: Multiple View Stereo Points  Meshes: Model Fitting + Meshes  Models: Texture Mapping = Images  Models: Image-based Modeling + + = Slide credit: J. Xiao

  14. Steps Images  Points: Structure from Motion Points  More points: Multiple View Stereo Points  Meshes: Model Fitting + Meshes  Models: Texture Mapping = Images  Models: Image-based Modeling + + = Slide credit: J. Xiao

  15. Steps Images  Points: Structure from Motion Points  More points: Multiple View Stereo Points  Meshes: Model Fitting + Meshes  Models: Texture Mapping = Images  Models: Image-based Modeling + + + = Slide credit: J. Xiao

  16. Steps Images  Points: Structure from Motion Points  More points: Multiple View Stereo Points  Meshes: Model Fitting + Meshes  Models: Texture Mapping = Images  Models: Image-based Modeling Slide credit: J. Xiao

  17. Steps Images  Points: Structure from Motion Points  More points: Multiple View Stereo Points  Meshes: Model Fitting + Meshes  Models: Texture Mapping = Images  Models: Image-based Modeling Slide credit: J. Xiao

  18. Steps Images  Points: Structure from Motion Points  More points: Multiple View Stereo Points  Meshes: Model Fitting + Meshes  Models: Texture Mapping = Images  Models: Image-based Modeling Example: https://photosynth.net/ Slide credit: J. Xiao

  19. Triangulation: Linear Solution X • Generally, rays C  x and C’  x ’ will not exactly intersect x x' • Solve via SVD: A least squares solution to a system of equations   x   PX x P X    T T u p p 3 1    T T v p p    AX  3 2 A 0       T T u p p  3 1      T T   p p v 3 2 Further reading: HZ p. 312-313

  20. Triangulation: Linear Solution 𝑼 𝑼 𝒀 𝒒 𝟐 𝒒 𝟐 𝑣   T   p u 𝑼 𝑼 𝒀 𝑤 𝐲 = 𝑥 = 𝑸𝒀 = 𝒀 = 𝒒 𝟑 𝒒 𝟑 1      1  T 𝑼 𝑼 𝒀 P p   𝒒 𝟒 𝒒 𝟒 x w v   2   T   p  1    𝑼 𝒀 𝑼 𝒀 𝑣𝒒 𝟒 𝒒 𝟐 3 𝑣 𝑼 𝒀 𝑼 𝒀 𝑤 𝑥 = = 𝑤𝒒 𝟒 𝒒 𝟑 1 𝑼 𝒀 𝑼 𝒀     𝒒 𝟒 𝒒 𝟒   T u p 1           T x w v P p     2       1  T p   3 𝑼 − 𝒒 𝟐 𝑼 𝒀 = 𝟏 𝑼 𝒀 − 𝒒 𝟐 𝑼 𝒀 𝑣𝒒 𝟒 = 𝑣𝒒 𝟒 𝑼 − 𝒒 𝟑 𝑼 𝒀 = 𝟏 𝑼 𝒀 − 𝒒 𝟑 𝑼 𝒀 𝑤𝒒 𝟒 = 𝑤𝒒 𝟒   x   PX x P X 𝑼 − 𝒒′ 𝟐 𝑼 𝒀 = 𝟏 𝑼 𝒀 − 𝒒′ 𝟐 𝑼 𝒀 = 𝑣′𝒒′ 𝟒 𝑣′𝒒′ 𝟒 𝑼 − 𝒒′ 𝟑 𝑼 𝒀 = 𝟏 𝑼 𝒀 − 𝒒′ 𝟑 𝑼 𝒀 = 𝑤′𝒒′ 𝟒 𝑤′𝒒′ 𝟒

  21. Triangulation: Linear Solution      u u         x w v x w v     Given P , P ’, x , x ’         1 1 1. Precondition points and projection matrices   T    p T p 2. Create matrix A 1   1    T    P p   T P p   3. [U, S, V] = svd(A) 2 2   T    p   T p   4. X = V(:, end) 3 3    T T u p p Pros and Cons 3 1    T T v p p   • Works for any number of  3 2 A       T T corresponding images u p p 3 1       • T T   v p p Not projectively invariant 3 2 Code: http://www.robots.ox.ac.uk/~vgg/hzbook/code/vgg_multiview/vgg_X_from_xP_lin.m

  22. Triangulation: Non-linear Solution • Minimize projected error while satisfying 𝒚 ′𝑈 𝑮ෝ ෝ 𝒚 =0 𝒚 2 + 𝑒𝑗𝑡𝑢 𝒚′, ෝ 𝒚′ 2 𝑑𝑝𝑡𝑢 𝒀 = 𝑒𝑗𝑡𝑢 𝒚, ෝ 𝒚′ ෝ 𝒚 𝒚 𝒚 ′ ෝ Figure source: Robertson and Cipolla (Chpt 13 of Practical Image Processing and Computer Vision)

  23. Triangulation: Non-linear Solution • Minimize projected error while satisfying 𝒚 ′𝑈 𝑮ෝ ෝ 𝒚 =0 𝒚 2 + 𝑒𝑗𝑡𝑢 𝒚′, ෝ 𝒚′ 2 𝑑𝑝𝑡𝑢 𝒀 = 𝑒𝑗𝑡𝑢 𝒚, ෝ • Solution is a 6-degree polynomial of t , minimizing Further reading: HZ p. 318

  24. Projective structure from motion • Given: m images of n fixed 3D points i = 1 ,… , m, j = 1 , … , n x ij = P i X j , • Problem: estimate m projection matrices P i and n 3D points X j from the mn corresponding 2D points x ij X j x 1 j x 3 j x 2 j P 1 P 3 P 2 Slides from Lana Lazebnik

  25. Projective structure from motion • Given: m images of n fixed 3D points • x ij = P i X j , i = 1 ,… , m, j = 1 , … , n • Problem: • Estimate unknown m projection matrices P i and n 3D points X j from the known mn corresponding points x ij • With no calibration info, cameras and points can only be recovered up to a 4x4 projective transformation Q : • X → QX, P → PQ -1 • We can solve for structure and motion when 2 mn >= 11 m + 3 n – 15 DoF in P i DoF in X j Up to 4x4 projective tform Q • For two cameras, at least 7 points are needed

  26. Sequential structure from motion • Initialize motion (calibration) from two images using fundamental matrix • Initialize structure by triangulation points • For each additional view: • Determine projection matrix of new camera using all the known 3D points cameras that are visible in its image – calibration/resectioning

  27. Sequential structure from motion • Initialize motion from two images using fundamental matrix • Initialize structure by triangulation points • For each additional view: • Determine projection matrix of new camera using all the known 3D points cameras that are visible in its image – calibration • Refine and extend structure: compute new 3D points, re-optimize existing points that are also seen by this camera – triangulation

  28. Sequential structure from motion • Initialize motion from two images using fundamental matrix • Initialize structure by triangulation points • For each additional view: • Determine projection matrix of new camera using all the known 3D cameras points that are visible in its image – calibration • Refine and extend structure: compute new 3D points, re- optimize existing points that are also seen by this camera – triangulation • Refine structure and motion: bundle adjustment

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend