Multiple View Geometry Comp Marc Pollefeys

Slides:



Advertisements
Similar presentations
Projective 3D geometry class 4
Advertisements

The fundamental matrix F
Lecture 11: Two-view geometry
3D reconstruction.
The Trifocal Tensor Multiple View Geometry. Scene planes and homographies plane induces homography between two views.
Computing 3-view Geometry Class 18
MASKS © 2004 Invitation to 3D vision Lecture 7 Step-by-Step Model Buidling.
Multiple View Reconstruction Class 24 Multiple View Geometry Comp Marc Pollefeys.
Epipolar Geometry class 11 Multiple View Geometry Comp Marc Pollefeys.
Scene Planes and Homographies class 16 Multiple View Geometry Comp Marc Pollefeys.
Multiple View Geometry
More on single-view geometry class 10 Multiple View Geometry Comp Marc Pollefeys.
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.
3D reconstruction class 11
Projective 2D geometry (cont’) course 3
Parameter estimation class 5 Multiple View Geometry Comp Marc Pollefeys.
Jan-Michael Frahm, Philippos Mordohai
Computing F and rectification class 14 Multiple View Geometry Comp Marc Pollefeys.
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.
Uncalibrated Geometry & Stratification Sastry and Yang
Parameter estimation class 6 Multiple View Geometry Comp Marc Pollefeys.
Lecture 21: Multiple-view geometry and structure from motion
Feature matching and tracking Class 5 Read Section 4.1 of course notes Read Shi and Tomasi’s paper on.
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
Multiple View Geometry
Feature tracking Class 5 Read Section 4.1 of course notes Read Shi and Tomasi’s paper on good features.
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
Multiple View Geometry
Multiple View Geometry
Two-view geometry Epipolar geometry F-matrix comp. 3D reconstruction Structure comp.
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
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.
Multiple View Geometry in Computer Vision
Assignment 2 Compute F automatically from image pair (putative matches, 8-point, 7-point, iterative, RANSAC, guided matching) (due by Wednesday 19/03/03)
Camera Models class 8 Multiple View Geometry Comp Marc Pollefeys.
 -Linearities and Multiple View Tensors Class 19 Multiple View Geometry Comp Marc Pollefeys.
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
More on single-view geometry class 10 Multiple View Geometry Comp Marc Pollefeys.
Multiple View Reconstruction Class 23 Multiple View Geometry Comp Marc Pollefeys.
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.
Camera Calibration class 9 Multiple View Geometry Comp Marc Pollefeys.
Projective 2D geometry course 2 Multiple View Geometry Comp Marc Pollefeys.
Multiple View Geometry
Epipolar geometry Class 5
The Trifocal Tensor Class 17 Multiple View Geometry Comp Marc Pollefeys.
Multiple View Geometry. THE GEOMETRY OF MULTIPLE VIEWS Reading: Chapter 10. Epipolar Geometry The Essential Matrix The Fundamental Matrix The Trifocal.
Epipolar geometry Class 5. Geometric Computer Vision course schedule (tentative) LectureExercise Sept 16Introduction- Sept 23Geometry & Camera modelCamera.
Computer vision: models, learning and inference
Projective cameras Motivation Elements of Projective Geometry Projective structure from motion Planches : –
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.
Two-view geometry Epipolar geometry F-matrix comp. 3D reconstruction
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.
Structure from motion Multi-view geometry Affine structure from motion Projective structure from motion Planches : –
Parameter estimation class 5 Multiple View Geometry CPSC 689 Slides modified from Marc Pollefeys’ Comp
Projective 2D geometry course 2 Multiple View Geometry Comp Marc Pollefeys.
Parameter estimation class 5
Epipolar geometry.
Epipolar Geometry class 11
3D Photography: Epipolar geometry
Multiple View Geometry Comp Marc Pollefeys
More on single-view geometry class 10
Estimating 2-view relationships
Multiple View Geometry Comp Marc Pollefeys
3D reconstruction class 11
Uncalibrated Geometry & Stratification
Parameter estimation class 6
Presentation transcript:

Multiple View Geometry Comp 290-089 Marc Pollefeys Computing F class 13 Multiple View Geometry Comp 290-089 Marc Pollefeys

Content Background: Projective geometry (2D, 3D), Parameter estimation, Algorithm evaluation. Single View: Camera model, Calibration, Single View Geometry. Two Views: Epipolar Geometry, 3D reconstruction, Computing F, Computing structure, Plane and homographies. Three Views: Trifocal Tensor, Computing T. More Views: N-Linearities, Multiple view reconstruction, Bundle adjustment, auto-calibration, Dynamic SfM, Cheirality, Duality

Multiple View Geometry course schedule (subject to change) Jan. 7, 9 Intro & motivation Projective 2D Geometry Jan. 14, 16 (no class) Jan. 21, 23 Projective 3D Geometry Jan. 28, 30 Parameter Estimation Feb. 4, 6 Algorithm Evaluation Camera Models Feb. 11, 13 Camera Calibration Single View Geometry Feb. 18, 20 Epipolar Geometry 3D reconstruction Feb. 25, 27 Fund. Matrix Comp. Structure Comp. Mar. 4, 6 Planes & Homographies Trifocal Tensor Mar. 18, 20 Three View Reconstruction Multiple View Geometry Mar. 25, 27 MultipleView Reconstruction Bundle adjustment Apr. 1, 3 Auto-Calibration Papers Apr. 8, 10 Dynamic SfM Apr. 15, 17 Cheirality Apr. 22, 24 Duality Project Demos

Two-view geometry Epipolar geometry 3D reconstruction F-matrix comp. Structure comp.

Fundamental matrix (3x3 rank 2 matrix) Epipolar geometry l2 C1 m1 L1 m2 L2 M C2 C1 C2 l2 p l1 e1 e2 m1 L1 m2 L2 M C1 C2 l2 p l1 e1 e2 Underlying structure in set of matches for rigid scenes m1 m2 lT1 l2 Fundamental matrix (3x3 rank 2 matrix) Computable from corresponding points Simplifies matching Allows to detect wrong matches Related to calibration Canonical representation:

The projective reconstruction theorem If a set of point correspondences in two views determine the fundamental matrix uniquely, then the scene and cameras may be reconstructed from these correspondences alone, and any two such reconstructions from these correspondences are projectively equivalent allows reconstruction from pair of uncalibrated images!

Objective Given two uncalibrated images compute (PM,P‘M,{XMi}) (i.e. within similarity of original scene and cameras) Algorithm Compute projective reconstruction (P,P‘,{Xi}) Compute F from xi↔x‘i Compute P,P‘ from F Triangulate Xi from xi↔x‘i Rectify reconstruction from projective to metric Direct method: compute H from control points Stratified method: Affine reconstruction: compute p∞ Metric reconstruction: compute IAC w

F F,H∞ p∞ w,w’ W∞ Image information provided View relations and projective objects 3-space objects reconstruction ambiguity point correspondences F projective point correspondences including vanishing points F,H∞ p∞ affine Points correspondences and internal camera calibration w,w’ W∞ metric

separate known from unknown Epipolar geometry: basic equation separate known from unknown (data) (unknowns) (linear)

the singularity constraint SVD from linearly computed F matrix (rank 3) Compute closest rank-2 approximation

the minimum case – 7 point correspondences one parameter family of solutions but F1+lF2 not automatically rank 2

the minimum case – impose rank 2 F1 F2 F 3 F7pts (obtain 1 or 3 solutions) (cubic equation) Compute possible l as eigenvalues of (only real solutions are potential solutions)

! the NOT normalized 8-point algorithm Orders of magnitude difference ~10000 ~100 1 ! Orders of magnitude difference Between column of data matrix  least-squares yields poor results

Transform image to ~[-1,1]x[-1,1] the normalized 8-point algorithm Transform image to ~[-1,1]x[-1,1] (0,0) (700,500) (700,0) (0,500) (1,-1) (0,0) (1,1) (-1,1) (-1,-1) Least squares yields good results (Hartley, PAMI´97)

algebraic minimization possible to iteratively minimize algebraic distance subject to det F=0 (see book if interested)

Geometric distance Gold standard Sampson error Symmetric epipolar distance

Gold standard Maximum Likelihood Estimation (= least-squares for Gaussian noise) Initialize: normalized 8-point, (P,P‘) from F, reconstruct Xi Parameterize: (overparametrized) Minimize cost using Levenberg-Marquardt (preferably sparse LM, see book)

Gold standard Alternative, minimal parametrization (with a=1) (note (x,y,1) and (x‘,y‘,1) are epipoles) problems: a=0  pick largest of a,b,c,d to fix epipole at infinity  pick largest of x,y,w and of x’,y’,w’ 4x3x3=36 parametrizations! reparametrize at every iteration, to be sure

Zhang&Loop’s approach CVIU’01

First-order geometric error (Sampson error) (one eq./point JJT scalar) (problem if some x is located at epipole) advantage: no subsidiary variables required

Symmetric epipolar error

Some experiments:

Some experiments:

Some experiments:

Some experiments: Residual error: (for all points!)

Recommendations: Do not use unnormalized algorithms Quick and easy to implement: 8-point normalized Better: enforce rank-2 constraint during minimization Best: Maximum Likelihood Estimation (minimal parameterization, sparse implementation)

Special case: Enforce constraints for optimal results: Pure translation (2dof), Planar motion (6dof), Calibrated case (5dof)

The envelope of epipolar lines What happens to an epipolar line if there is noise? Monte Carlo n=10 n=15 n=25 n=50

Other entities? Lines give no constraint for two view geometry (but will for three and more views) Curves and surfaces yield some constraints related to tangency

Automatic computation of F Interest points Putative correspondences RANSAC (iv) Non-linear re-estimation of F Guided matching (repeat (iv) and (v) until stable)

Extract feature points to relate images Required properties: Well-defined (i.e. neigboring points should all be different) Stable across views (i.e. same 3D point should be extracted as feature for neighboring viewpoints)

(e.g.Harris&Stephens´88; Shi&Tomasi´94) Feature points (e.g.Harris&Stephens´88; Shi&Tomasi´94) Find points that differ as much as possible from all neighboring points homogeneous edge corner M should have large eigenvalues Feature = local maxima (subpixel) of F(1,  2)

Select strongest features (e.g. 1000/image) Feature points Select strongest features (e.g. 1000/image)

? Evaluate NCC for all features with similar coordinates Feature matching Evaluate NCC for all features with similar coordinates Keep mutual best matches Still many wrong matches! ?

Feature example 1 5 2 4 3 1 5 2 4 3 Gives satisfying results 0.96 -0.40 -0.16 -0.39 0.19 -0.05 0.75 -0.47 0.51 0.72 -0.18 0.73 0.15 -0.75 -0.27 0.49 0.16 0.79 0.21 0.08 0.50 -0.45 0.28 0.99 1 5 2 4 3 Gives satisfying results for small image motions

Requirement to cope with larger variations between images Wide-baseline matching… Requirement to cope with larger variations between images Translation, rotation, scaling Foreshortening Non-diffuse reflections Illumination geometric transformations photometric changes

(Tuytelaars and Van Gool BMVC 2000) Wide-baseline matching… (Tuytelaars and Van Gool BMVC 2000) Wide baseline matching for two different region types

RANSAC Step 1. Extract features Step 2. Compute a set of potential matches Step 3. do Step 3.1 select minimal sample (i.e. 7 matches) Step 3.2 compute solution(s) for F Step 3.3 determine inliers until (#inliers,#samples)<95% (generate hypothesis) (verify hypothesis) Step 4. Compute F based on all inliers Step 5. Look for additional matches Step 6. Refine F based on all correct matches #inliers 90% 80% 70% 60% 50% #samples 5 13 35 106 382

restrict search range to neighborhood of epipolar line Finding more matches restrict search range to neighborhood of epipolar line (1.5 pixels) relax disparity restriction (along epipolar line)

Model selection (Torr et al., ICCV´98, Kanatani, Akaike) Degenerate cases: Degenerate cases Planar scene Pure rotation No unique solution Remaining DOF filled by noise Use simpler model (e.g. homography) Model selection (Torr et al., ICCV´98, Kanatani, Akaike) Compare H and F according to expected residual error (compensate for model complexity)

Absence of sufficient features (no texture) More problems: Absence of sufficient features (no texture) Repeated structure ambiguity Robust matcher also finds support for wrong hypothesis solution: detect repetition (Schaffalitzky and Zisserman, BMVC‘98)

geometric relations between two views is fully two-view geometry geometric relations between two views is fully described by recovered 3x3 matrix F

Next class: image pair rectification reconstructing points and lines