Structure from motion Class 9 Read Chapter 5. 3D photography course schedule (tentative) LectureExercise Sept 26Introduction- Oct. 3Geometry & Camera.

Slides:



Advertisements
Similar presentations
The fundamental matrix F
Advertisements

The Trifocal Tensor Multiple View Geometry. Scene planes and homographies plane induces homography between two views.
MASKS © 2004 Invitation to 3D vision Lecture 7 Step-by-Step Model Buidling.
Two-View Geometry CS Sastry and Yang
Multiple View Reconstruction Class 24 Multiple View Geometry Comp Marc Pollefeys.
N-view factorization and bundle adjustment CMPUT 613.
Shape-from-X Class 11 Some slides from Shree Nayar. others.
Lecture 11: Structure from Motion
Structure from motion.
Algorithms & Applications in Computer Vision
Self-calibration and multi-view geometry Class 10 Read Chapter 6 and 3.2.
Projective structure from motion
Multiple View Geometry
Adam Rachmielowski 615 Project: Real-time monocular vision-based SLAM.
Robot Vision SS 2008 Matthias Rüther 1 ROBOT VISION Lesson 6: Shape from Stereo Matthias Rüther Slides partial courtesy of Marc Pollefeys Department of.
Computer Vision cmput 613 Sequential 3D Modeling from images using epipolar geometry and F 3D Modeling from images using epipolar geometry and F Martin.
Parameter estimation class 5 Multiple View Geometry Comp Marc Pollefeys.
Computer Vision Projective structure from motion Marc Pollefeys COMP 256 Some slides and illustrations from J. Ponce, …
Computing F Class 8 Read notes Section 4.2. C1C1 C2C2 l2l2  l1l1 e1e1 e2e2 Fundamental matrix (3x3 rank 2 matrix) 1.Computable from corresponding points.
Epipolar geometry. (i)Correspondence geometry: Given an image point x in the first view, how does this constrain the position of the corresponding point.
Structure from motion. Multiple-view geometry questions Scene geometry (structure): Given 2D point matches in two or more images, where are the corresponding.
Uncalibrated Geometry & Stratification Sastry and Yang
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
Multiple-view Reconstruction from Points and Lines
Many slides and illustrations from J. Ponce
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
Lecture 11: Structure from motion CS6670: Computer Vision Noah Snavely.
Two-view geometry Epipolar geometry F-matrix comp. 3D reconstruction Structure comp.
Self-calibration Class 13 Read Chapter 6. Assignment 3 Collect potential matches from all algorithms for all pairs Matlab ASCII format, exchange data.
3D photography Marc Pollefeys Fall 2007
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
Triangulation and Multi-View Geometry Class 9 Read notes Section 3.3, , 5.1 (if interested, read Triggs’s paper on MVG using tensor notation, see.
Single View Metrology Class 3. 3D photography course schedule (tentative) LectureExercise Sept 26Introduction- Oct. 3Geometry & Camera modelCamera calibration.
Assignment 2 Compute F automatically from image pair (putative matches, 8-point, 7-point, iterative, RANSAC, guided matching) (due by Wednesday 19/03/03)
Previously Two view geometry: epipolar geometry Stereo vision: 3D reconstruction epipolar lines Baseline O O’ epipolar plane.
Computer Vision Structure from motion Marc Pollefeys COMP 256 Some slides and illustrations from J. Ponce, A. Zisserman, R. Hartley, Luc Van Gool, …
Structure from motion Class 12 Read Chapter 5. Assignment 2 ChrisMS regions Nathan… BrianM&S LoG features LiSIFT features ChadMS regions Seon JooSIFT.
Multiple View Reconstruction Class 23 Multiple View Geometry Comp Marc Pollefeys.
CSCE 641 Computer Graphics: Image-based Modeling (Cont.) Jinxiang Chai.
Algorithm Evaluation and Error Analysis class 7 Multiple View Geometry Comp Marc Pollefeys.
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
Epipolar geometry Class 5
CSCE 641 Computer Graphics: Image-based Modeling (Cont.) Jinxiang Chai.
3D photography Marc Pollefeys Fall 2008
Epipolar geometry Class 5. Geometric Computer Vision course schedule (tentative) LectureExercise Sept 16Introduction- Sept 23Geometry & Camera modelCamera.
Computer vision: models, learning and inference
CSCE 643 Computer Vision: Structure from Motion
Robot Vision SS 2007 Matthias Rüther 1 ROBOT VISION Lesson 6a: Shape from Stereo, short summary Matthias Rüther Slides partial courtesy of Marc Pollefeys.
Computing F. Content Background: Projective geometry (2D, 3D), Parameter estimation, Algorithm evaluation. Single View: Camera model, Calibration, Single.
Parameter estimation. 2D homography Given a set of (x i,x i ’), compute H (x i ’=Hx i ) 3D to 2D camera projection Given a set of (X i,x i ), compute.
Affine Structure from Motion
A Flexible New Technique for Camera Calibration Zhengyou Zhang Sung Huh CSPS 643 Individual Presentation 1 February 25,
EECS 274 Computer Vision Geometric Camera Calibration.
EECS 274 Computer Vision Affine Structure from Motion.
3D reconstruction from uncalibrated images
776 Computer Vision Jan-Michael Frahm & Enrique Dunn Spring 2013.
Uncalibrated reconstruction Calibration with a rig Uncalibrated epipolar geometry Ambiguities in image formation Stratified reconstruction Autocalibration.
Structure from Motion Paul Heckbert, Nov , Image-Based Modeling and Rendering.
Structure from motion Multi-view geometry Affine structure from motion Projective structure from motion Planches : –
EECS 274 Computer Vision Projective Structure from Motion.
Parameter estimation class 5 Multiple View Geometry CPSC 689 Slides modified from Marc Pollefeys’ Comp
Lecture 22: Structure from motion CS6670: Computer Vision Noah Snavely.
Parameter estimation class 5
Epipolar geometry.
3D Photography: Epipolar geometry
Structure from motion Input: Output: (Tomasi and Kanade)
Estimating 2-view relationships
Uncalibrated Geometry & Stratification
Structure from motion Input: Output: (Tomasi and Kanade)
Parameter estimation class 6
Presentation transcript:

Structure from motion Class 9 Read Chapter 5

3D photography course schedule (tentative) LectureExercise Sept 26Introduction- Oct. 3Geometry & Camera modelCamera calibration Oct. 10Single View MetrologyMeasuring in images Oct. 17Feature Tracking/matching (Friedrich Fraundorfer) Correspondence computation Oct. 24Epipolar GeometryF-matrix computation Oct. 31Shape-from-Silhouettes (Li Guan) Visual-hull computation Nov. 7Stereo matchingProject proposals Nov. 14Structured light and active range sensing Papers Nov. 21Structure from motionPapers Nov. 28Multi-view geometry and self-calibration Papers Dec. 5Shape-from-XPapers Dec. 123D modeling and registrationPapers Dec. 19Appearance modeling and image-based rendering Final project presentations

Today’s class Structure from motion factorization sequential bundle adjustment

Factorization Factorise observations in structure of the scene and motion/calibration of the camera Use all points in all images at the same time Affine factorisation Projective factorisation

Affine camera The affine projection equations are how to find the origin? or for that matter a 3D reference point? affine projection preserves center of gravity

Orthographic factorization The ortographic projection equations are where All equations can be collected for all i and j where Note that P and M are resp. 2 m x3 and 3x n matrices and therefore the rank of m is at most 3 (Tomasi Kanade’92)

Orthographic factorization Factorize m through singular value decomposition An affine reconstruction is obtained as follows (Tomasi Kanade’92) Closest rank-3 approximation yields MLE!

A metric reconstruction is obtained as follows Where A is computed from Orthographic factorization Factorize m through singular value decomposition An affine reconstruction is obtained as follows 3 linear equations per view on symmetric matrix C (6DOF) A can be obtained from C through Cholesky factorisation and inversion (Tomasi Kanade’92)

Examples Tomasi Kanade’92, Poelman & Kanade’94

Examples Tomasi Kanade’92, Poelman & Kanade’94

Examples Tomasi Kanade’92, Poelman & Kanade’94

Examples Tomasi Kanade’92, Poelman & Kanade’94

Perspective factorization The camera equations for a fixed image i can be written in matrix form as where

Perspective factorization All equations can be collected for all i as where In these formulas m are known, but  i, P and M are unknown Observe that PM is a product of a 3 m x4 matrix and a 4x n matrix, i.e. it is a rank-4 matrix

Perspective factorization algorithm Assume that  i are known, then PM is known. Use the singular value decomposition PM =U  V T In the noise-free case  =diag(  1,  2,  3,  4,0, …,0) and a reconstruction can be obtained by setting: P =the first four columns of U . M =the first four rows of V.

Iterative perspective factorization When  i are unknown the following algorithm can be used: 1. Set ij =1 (affine approximation). 2. Factorize PM and obtain an estimate of P and M. If  5 is sufficiently small then STOP. 3. Use m, P and M to estimate  i from the camera equations (linearly) m i  i = P i M 4. Goto 2. In general the algorithm minimizes the proximity measure P( , P, M )=  5 Note that structure and motion recovered up to an arbitrary projective transformation

Further Factorization work Factorization with uncertainty Factorization for dynamic scenes (Irani & Anandan, IJCV’02) (Costeira and Kanade ‘94) (Bregler et al. ‘00, Brand ‘01) (Yan and Pollefeys, ‘05/’06)

practical structure and motion recovery from images Obtain reliable matches using matching or tracking and 2/3-view relations Compute initial structure and motion Refine structure and motion Auto-calibrate Refine metric structure and motion

Initialize Motion (P 1,P 2 compatibel with F) Sequential Structure and Motion Computation Initialize Structure (minimize reprojection error) Extend motion (compute pose through matches seen in 2 or more previous views) Extend structure (Initialize new structure, refine existing structure)

Computation of initial structure and motion according to Hartley and Zisserman “this area is still to some extend a black-art” All features not visible in all images  No direct method (factorization not applicable)  Build partial reconstructions and assemble (more views is more stable, but less corresp.) 1) Sequential structure and motion recovery 2) Hierarchical structure and motion recovery

Sequential structure and motion recovery Initialize structure and motion from two views For each additional view Determine pose Refine and extend structure Determine correspondences robustly by jointly estimating matches and epipolar geometry

Initial structure and motion Epipolar geometry  Projective calibration compatible with F Yields correct projective camera setup (Faugeras´92,Hartley´92) Obtain structure through triangulation Use reprojection error for minimization Avoid measurements in projective space

Compute P i+1 using robust approach (6-point RANSAC) Extend and refine reconstruction 2D-2D 2D-3D mimi m i+1 M new view Determine pose towards existing structure

Compute P with 6-point RANSAC Generate hypothesis using 6 points Count inliers Projection error Back-projection error Re-projection error 3D error Projection error with covariance Expensive testing? Abort early if not promising Verify at random, abort if e.g. P(wrong)>0.95 (Chum and Matas, BMVC’02)

Dealing with dominant planar scenes USaM fails when common features are all in a plane Solution: part 1 Model selection to detect problem (Pollefeys et al., ECCV‘02)

Dealing with dominant planar scenes USaM fails when common features are all in a plane Solution: part 2 Delay ambiguous computations until after self-calibration (couple self-calibration over all 3D parts) (Pollefeys et al., ECCV‘02)

Non-sequential image collections 4.8im/pt 64 images 3792 points Problem: Features are lost and reinitialized as new features Solution: Match with other close views

For every view i Extract features Compute two view geometry i-1/i and matches Compute pose using robust algorithm Refine existing structure Initialize new structure Relating to more views Problem: find close views in projective frame For every view i Extract features Compute two view geometry i-1/i and matches Compute pose using robust algorithm For all close views k Compute two view geometry k/i and matches Infer new 2D-3D matches and add to list Refine pose using all 2D-3D matches Refine existing structure Initialize new structure

Determining close views If viewpoints are close then most image changes can be modelled through a planar homography Qualitative distance measure is obtained by looking at the residual error on the best possible planar homography Distance =

9.8im/pt 4.8im/pt 64 images 3792 points 2170 points Non-sequential image collections (2)

Hierarchical structure and motion recovery Compute 2-view Compute 3-view Stitch 3-view reconstructions Merge and refine reconstruction F T H PM

Stitching 3-view reconstructions Different possibilities 1. Align (P 2,P 3 ) with (P’ 1,P’ 2 ) 2. Align X,X’ (and C’C’) 3. Minimize reproj. error 4. MLE (merge)

Refining structure and motion Minimize reprojection error Maximum Likelyhood Estimation (if error zero-mean Gaussian noise) Huge problem but can be solved efficiently (Bundle adjustment)

Non-linear least-squares Newton iteration Levenberg-Marquardt Sparse Levenberg-Marquardt

Newton iteration Taylor approximation Jacobian normal eq.

Levenberg-Marquardt Augmented normal equations Normal equations solve again accept small ~ Newton (quadratic convergence) large ~ descent (guaranteed decrease)

Levenberg-Marquardt Requirements for minimization Function to compute f Start value P 0 Optionally, function to compute J (but numerical ok, too)

Sparse Levenberg-Marquardt complexity for solving prohibitive for large problems (100 views 10,000 points ~30,000 unknowns) Partition parameters partition A partition B (only dependent on A and itself)

Sparse bundle adjustment residuals: normal equations: with note: tie points should be in partition A

Sparse bundle adjustment normal equations: modified normal equations: solve in two parts:

Sparse bundle adjustment U1U1 U2U2 U3U3 WTWT W V P1P1 P2P2 P3P3 M Jacobian of has sparse block structure 12xm 3xn (in general much larger) im.pts. view 1 Needed for non-linear minimization

Sparse bundle adjustment Eliminate dependence of camera/motion parameters on structure parameters Note in general 3n >> 11m WTWT V U-WV -1 W T 11xm 3xn Allows much more efficient computations e.g. 100 views,10000 points, solve  1000x1000, not  30000x30000 Often still band diagonal use sparse linear algebra algorithms

Sparse bundle adjustment normal equations: modified normal equations: solve in two parts:

Sparse bundle adjustment Covariance estimation

Related problems On-line structure from motion and SLaM (Simultaneous Localization and Mapping) Kalman filter (linear) Particle filters (non-linear)

Open challenges Large scale structure from motion Complete building Complete city

Next class: Multi-View Geometry and Self-Calibration