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.

Slides:



Advertisements
Similar presentations
Epipolar Geometry.
Advertisements

The fundamental matrix F
Lecture 11: Two-view geometry
3D reconstruction.
MASKS © 2004 Invitation to 3D vision Lecture 7 Step-by-Step Model Buidling.
Robot Vision SS 2005 Matthias Rüther 1 ROBOT VISION Lesson 3: Projective Geometry Matthias Rüther Slides courtesy of Marc Pollefeys Department of Computer.
Two-view geometry.
Lecture 8: Stereo.
Epipolar Geometry class 11 Multiple View Geometry Comp Marc Pollefeys.
Camera calibration and epipolar geometry
Multiple View Geometry
Epipolar Geometry Class 7 Read notes Feature tracking run iterative L-K warp & upsample Tracking Good features Multi-scale Transl. Affine.
3D reconstruction class 11
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
Epipolar Geometry and the Fundamental Matrix F
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
Multiple View Geometry
3D reconstruction of cameras and structure x i = PX i x’ i = P’X i.
Multiple View Geometry Comp Marc Pollefeys
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.
Assignment 2 Compute F automatically from image pair (putative matches, 8-point, 7-point, iterative, RANSAC, guided matching) (due by Wednesday 19/03/03)
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.
Multiple View Reconstruction Class 23 Multiple View Geometry Comp Marc Pollefeys.
May 2004Stereo1 Introduction to Computer Vision CS / ECE 181B Tuesday, May 11, 2004  Multiple view geometry and stereo  Handout #6 available (check with.
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
Multiple View Geometry
Epipolar geometry Class 5
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
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.
Multi-view geometry. Multi-view geometry problems Structure: Given projections of the same 3D point in two or more images, compute the 3D coordinates.
Automatic Camera Calibration
Lecture 11 Stereo Reconstruction I Lecture 11 Stereo Reconstruction I Mata kuliah: T Computer Vision Tahun: 2010.
Multi-view geometry.
Projective cameras Motivation Elements of Projective Geometry Projective structure from motion Planches : –
Lecture 04 22/11/2011 Shai Avidan הבהרה : החומר המחייב הוא החומר הנלמד בכיתה ולא זה המופיע / לא מופיע במצגת.
Structure from Motion Course web page: vision.cis.udel.edu/~cv April 25, 2003  Lecture 26.
Multiview Geometry and Stereopsis. Inputs: two images of a scene (taken from 2 viewpoints). Output: Depth map. Inputs: multiple images of a scene. Output:
Stereo Course web page: vision.cis.udel.edu/~cv April 11, 2003  Lecture 21.
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.
1 Formation et Analyse d’Images Session 7 Daniela Hall 25 November 2004.
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.
Geometry of Multiple Views
Two-view geometry. Epipolar Plane – plane containing baseline (1D family) Epipoles = intersections of baseline with image planes = projections of the.
Parameter estimation class 5 Multiple View Geometry CPSC 689 Slides modified from Marc Pollefeys’ Comp
Lec 26: Fundamental Matrix CS4670 / 5670: Computer Vision Kavita Bala.
Multi-view geometry. Multi-view geometry problems Structure: Given projections of the same 3D point in two or more images, compute the 3D coordinates.
Two-view geometry Computer Vision Spring 2018, Lecture 10
Epipolar geometry.
Epipolar Geometry class 11
3D Photography: Epipolar geometry
Multiple View Geometry Comp Marc Pollefeys
Estimating 2-view relationships
3D reconstruction class 11
Uncalibrated Geometry & Stratification
Two-view geometry Epipolar geometry F-matrix comp. 3D reconstruction
Two-view geometry.
Presentation transcript:

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 Science University of North Carolina, Chapel Hill

Robot Vision SS 2008 Matthias Rüther 2 Content  Two View Geometry –Epipolar Geometry –3D reconstruction  Computing F –Point Correspondences –Interest Points –Matching

Robot Vision SS 2008 Matthias Rüther 3 C, C’, x, x’ and X are coplanar Epipolar Geometry

Robot Vision SS 2008 Matthias Rüther 4 (i)Correspondence geometry: Given an image point x in the first view, how does this constrain the position of the corresponding point x’ in the second image? (ii)Camera geometry (motion): Given a set of corresponding image points {x i ↔x’ i }, i=1,…,n, what are the cameras P and P’ for the two views? (iii)Scene geometry (structure): Given corresponding image points x i ↔x’ i and cameras P, P’, what is the position of (their pre-image) X in space? Three Questions

Robot Vision SS 2008 Matthias Rüther 5 What if only C, C’, x are known? Epipolar Geometry

Robot Vision SS 2008 Matthias Rüther 6 All points on  project on l and l’ Epipolar Geometry

Robot Vision SS 2008 Matthias Rüther 7 Family of planes  and lines l and l’ Intersection in e and e’ Epipolar Geometry

Robot Vision SS 2008 Matthias Rüther 8 epipoles e,e’ = intersection of baseline with image plane = projection of projection center in other image = vanishing point of camera motion direction an epipolar plane = plane containing baseline (1-D family) an epipolar line = intersection of epipolar plane with image (always come in corresponding pairs) Epipolar Geometry

Robot Vision SS 2008 Matthias Rüther 9 Example: Converging Cameras

Robot Vision SS 2008 Matthias Rüther 10 Example: motion parallel with image plane

Robot Vision SS 2008 Matthias Rüther 11 e e’ Example: forward motion

Robot Vision SS 2008 Matthias Rüther 12 algebraic representation of epipolar geometry we will see that mapping is (singular) correlation (i.e. projective mapping from points to lines) represented by the fundamental matrix F The Fundamental Matrix (F)

Robot Vision SS 2008 Matthias Rüther 13 geometric derivation mapping from 2-D to 1-D family (rank 2) The Fundamental Matrix (F)

Robot Vision SS 2008 Matthias Rüther 14 algebraic derivation (note: doesn’t work for C=C’  F=0) The Fundamental Matrix (F)

Robot Vision SS 2008 Matthias Rüther 15 correspondence condition The fundamental matrix satisfies the condition that for any pair of corresponding points x↔x ’ in the two images The Fundamental Matrix (F)

Robot Vision SS 2008 Matthias Rüther 16 F is the unique 3x3 rank 2 matrix that satisfies x’ T Fx=0 for all x↔x’ (i)Transpose: if F is fundamental matrix for (P,P’), then F T is fundamental matrix for (P’,P) (ii)Epipolar lines: l’=Fx & l=F T x’ (iii)Epipoles: on all epipolar lines, thus e’ T Fx=0,  x  e’ T F=0, similarly Fe=0 (iv)F has 7 d.o.f., i.e. 3x3-1(homogeneous)-1(rank2) (v)F is a correlation, projective mapping from a point x to a line l’=Fx (not a proper correlation, i.e. not invertible) The Fundamental Matrix (F)

Robot Vision SS 2008 Matthias Rüther 17 l,l’ epipolar lines, k line not through e  l’=F[k] x l and symmetrically l=F T [k’] x l’ (pick k=e, since e T e≠0) Epipolar Line Geometry

Robot Vision SS 2008 Matthias Rüther 18 Derivation based purely on projective concepts F invariant to transformations of projective 3-space unique not unique canonical form Invariance under projective transformation

Robot Vision SS 2008 Matthias Rüther 19 F matrix corresponds to P,P’ iff P’ T FP is skew-symmetric Possible choice: Canonical representation: Canonical cameras given F

Robot Vision SS 2008 Matthias Rüther 20 ~fundamental matrix for calibrated cameras (remove K) 5 d.o.f. (3 for R; 2 for t up to scale) E is essential matrix if and only if two singular values are equal (and third=0) The Essential Matrix

Robot Vision SS 2008 Matthias Rüther 21 (only one solution where points is in front of both cameras) Reconstruction from E: four possible solutions

Robot Vision SS 2008 Matthias Rüther 22 C1C1 C2C2 l2l2 P l1l1 e1e1 e2e2 Fundamental matrix (3x3 rank 2 matrix) 1.Computable from corresponding points 2.Simplifies matching 3.Allows to detect wrong matches 4.Related to calibration Underlying structure in set of matches for rigid scenes l2l2 C1C1 m1m1 L1L1 m2m2 L2L2 M C2C2 m1m1 m2m2 C1C1 C2C2 l2l2 P l1l1 e1e1 e2e2 m1m1 L1L1 m2m2 L2L2 M l2l2 lT1lT1 Canonical representation: Epipolar Geometry

Robot Vision SS 2008 Matthias Rüther 23 given x i ↔x‘ i, compute P,P‘ and X i reconstruction problem: for all i without additional information possible up to projective ambiguity 3D reconstruction of cameras and structure

Robot Vision SS 2008 Matthias Rüther 24 (i)Compute F from correspondences (ii)Compute camera matrices from F (iii)Compute 3D point for each pair of corresponding points computation of F use x‘ i Fx i =0 equations, linear in coeff. F 8 points (linear), 7 points (non-linear), 8+ (least-squares) computation of camera matrices use triangulation compute intersection of two backprojected rays Outline of reconstruction

Robot Vision SS 2008 Matthias Rüther 25 Reconstruction ambiguity: similarity

Robot Vision SS 2008 Matthias Rüther 26 Reconstruction ambiguity: projective

Robot Vision SS 2008 Matthias Rüther 27 x i ↔x‘ i Original scene X i Projective, affine, similarity reconstruction = reconstruction that is identical to original up to projective, affine, similarity transformation Literature: Metric and Euclidean reconstruction = similarity reconstruction Terminology

Robot Vision SS 2008 Matthias Rüther 28 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  along same ray of P 2, idem for P ‘ 2 two possibilities: X 2 i = HX 1 i, or points along baseline key result: allows reconstruction from pair of uncalibrated images The projective reconstruction theorem

Robot Vision SS 2008 Matthias Rüther 29

Robot Vision SS 2008 Matthias Rüther 30 (i)Projective reconstruction (ii)Affine reconstruction (iii)Metric reconstruction Stratified reconstruction

Robot Vision SS 2008 Matthias Rüther 31 use control points X E i with known coordinates to go from projective to metric (2 lin. eq. in H -1 per view, 3 for two views) Direct metric reconstruction using ground truth

Robot Vision SS 2008 Matthias Rüther 32 C1C1 C2C2 l2l2  l1l1 e1e1 e2e2 Fundamental matrix (3x3 rank 2 matrix) 1.Computable from corresponding points 2.Simplifies matching 3.Allows to detect wrong matches 4.Related to calibration Underlying structure in set of matches for rigid scenes l2l2 C1C1 m1m1 L1L1 m2m2 L2L2 M C2C2 m1m1 m2m2 C1C1 C2C2 l2l2  l1l1 e1e1 e2e2 m1m1 L1L1 m2m2 L2L2 M l2l2 lT1lT1 Canonical representation: Epipolar Geometry: computation of F

Robot Vision SS 2008 Matthias Rüther 33 separate known from unknown (data) (unknowns) (linear) Computation of F: basic equation

Robot Vision SS 2008 Matthias Rüther 34 SVD from linearly computed F matrix (rank 3) Compute closest rank-2 approximation Imposing the singularity constraint

Robot Vision SS 2008 Matthias Rüther 35

Robot Vision SS 2008 Matthias Rüther 36 ~10000 ~100 1 ! Orders of magnitude difference Between column of data matrix  least-squares yields poor results The NOT normalized 8-point algorithm

Robot Vision SS 2008 Matthias Rüther 37 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) The normalized 8-point algorithm

Robot Vision SS 2008 Matthias Rüther 38 Maximum Likelihood Estimation (= least-squares for Gaussian noise) Parameterize: Initialize: normalized 8-point, (P,P‘) from F, reconstruct X i Minimize cost using Levenberg-Marquardt (preferably sparse LM, see book) (overparametrized) The Gold Standard Algorithm

Robot Vision SS 2008 Matthias Rüther 39 Examples

Robot Vision SS 2008 Matthias Rüther 40 Examples

Robot Vision SS 2008 Matthias Rüther 41 Examples

Robot Vision SS 2008 Matthias Rüther 42 1.Do not use unnormalized algorithms 2.Quick and easy to implement: 8-point normalized 3.Better: enforce rank-2 constraint during minimization 4.Best: Maximum Likelihood Estimation (minimal parameterization, sparse implementation) Recommendations

Robot Vision SS 2008 Matthias Rüther 43  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) The correspondence problem: feature points

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

Robot Vision SS 2008 Matthias Rüther 45 Select strongest features (e.g. 1000/image) Feature points

Robot Vision SS 2008 Matthias Rüther 46 Evaluate NCC for all features with similar coordinates Keep mutual best matches Still many wrong matches! ? Feature matching

Robot Vision SS 2008 Matthias Rüther Gives satisfying results for small image motions Similarity Example

Robot Vision SS 2008 Matthias Rüther 48 Step 1. Extract features Step 2. Compute a set of potential matches Step 3. do Step 3.1 select minimal sample (i.e. 8 matches) Step 3.2 compute F Step 3.3 determine inliers until  (#inliers,#samples)<95% #inliers90%80%70%60%50% #samples Step 4. Compute F based on all inliers Step 5. Look for additional matches Step 6. Refine F based on all correct matches (generate hypothesis) (verify hypothesis) RANSAC

Robot Vision SS 2008 Matthias Rüther 49 restrict search range to neighborhood of epipolar line (  1.5 pixels) relax disparity restriction (along epipolar line) Finding more matches

Robot Vision SS 2008 Matthias Rüther 50  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) Degenerate Cases

Robot Vision SS 2008 Matthias Rüther 51  Absence of sufficient features (no texture)  Repeated structure ambiguity (Schaffalitzky and Zisserman, BMVC‘98) Robust matcher also finds Robust matcher also finds support for wrong hypothesis support for wrong hypothesis solution: detect repetition solution: detect repetition More problems