Multiple View Geometry

Slides:



Advertisements
Similar presentations
The Trifocal Tensor Multiple View Geometry. Scene planes and homographies plane induces homography between two views.
Advertisements

Computing 3-view Geometry Class 18
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.
Computer vision: models, learning and inference
776 Computer Vision Jared Heinly Spring 2014 (slides borrowed from Jan-Michael Frahm, Svetlana Lazebnik, and others)
Computer Vision Fitting Marc Pollefeys COMP 256 Some slides and illustrations from D. Forsyth, T. Darrel, A. Zisserman,...
Computer Vision Fitting Marc Pollefeys COMP 256 Some slides and illustrations from D. Forsyth, T. Darrel, A. Zisserman,...
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
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.
Robust Estimator 學生 : 范育瑋 老師 : 王聖智. Outline Introduction LS-Least Squares LMS-Least Median Squares RANSAC- Random Sample Consequence MLESAC-Maximum likelihood.
Parameter estimation class 5 Multiple View Geometry Comp Marc Pollefeys.
Jan-Michael Frahm, Philippos Mordohai
Fitting. We’ve learned how to detect edges, corners, blobs. Now what? We would like to form a higher-level, more compact representation of the features.
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.
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
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
Geometric Optimization Problems in Computer Vision.
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.
Single View Metrology Class 3. 3D photography course schedule (tentative) LectureExercise Sept 26Introduction- Oct. 3Geometry & Camera modelCamera calibration.
CMPUT 412 3D Computer Vision Presented by Azad Shademan Feb , 2007.
Singular Value Decomposition. Homogeneous least-squares Span and null-space Closest rank r approximation Pseudo inverse.
Fitting. Choose a parametric object/some objects to represent a set of tokens Most interesting case is when criterion is not local –can’t tell whether.
Lecture 8: Image Alignment and RANSAC
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.
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.
Lecture 10: Robust fitting CS4670: Computer Vision Noah Snavely.
1Jana Kosecka, CS 223b EM and RANSAC EM and RANSAC.
Multiple View Geometry
Structure Computation. How to compute the position of a point in 3- space given its image in two views and the camera matrices of those two views Use.
Fitting.
Image Stitching Ali Farhadi CSE 455
Projective geometry of 2-space DLT alg HZ 4.1 Rectification HZ 2.7 Hierarchy of maps Invariants HZ 2.4 Projective transform HZ 2.3 Behaviour at infinity.
Computing the Fundamental matrix Peter Praženica FMFI UK May 5, 2008.
Epipolar geometry The fundamental matrix and the tensor
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.
Computer Vision : CISC 4/689 Going Back a little Cameras.ppt.
A Flexible New Technique for Camera Calibration Zhengyou Zhang Sung Huh CSPS 643 Individual Presentation 1 February 25,
776 Computer Vision Jan-Michael Frahm Spring 2012.
Robust Estimation Course web page: vision.cis.udel.edu/~cv April 23, 2003  Lecture 25.
Fitting.
Parameter estimation class 5 Multiple View Geometry CPSC 689 Slides modified from Marc Pollefeys’ Comp
Camera Calibration Course web page: vision.cis.udel.edu/cv March 24, 2003  Lecture 17.
Lecture 7: Image alignment
Parameter estimation class 5
Homography From Wikipedia In the field of computer vision, any
A special case of calibration
3D Photography: Epipolar geometry
Multiple View Geometry Comp Marc Pollefeys
Fitting.
Estimating 2-view relationships
Segmentation by fitting a model: robust estimators and RANSAC
Calibration and homographies
Back to equations of geometric transformations
Parameter estimation class 6
CS5760: Computer Vision Lecture 9: RANSAC Noah Snavely
Image Stitching Linda Shapiro ECE/CSE 576.
Image Stitching Linda Shapiro ECE P 596.
Presentation transcript:

Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai

Outline Parameter estimation Robust estimation (RANSAC) Chapter 4 of “Multiple View Geometry in Computer Vision” by Hartley and Zisserman

Parameter estimation 2D homography 3D to 2D camera projection Given a set of (xi,xi’), compute H (xi’=Hxi) 3D to 2D camera projection Given a set of (Xi,xi), compute P (xi=PXi) Fundamental matrix Given a set of (xi,xi’), compute F (xi’TFxi=0) Trifocal tensor Given a set of (xi,xi’,xi”), compute T

Number of measurements required At least as many independent equations as degrees of freedom required Example: 2 independent equations / point 8 degrees of freedom 4x2≥8

Approximate solutions Minimal solution 4 points yield an exact solution for H More points No exact solution, because measurements are inexact (“noise”) Search for “best” according to some cost function Algebraic or geometric/statistical cost Exact solutions are important for robust approaches

Gold Standard algorithm Cost function that is optimal for some assumptions Computational algorithm that minimizes it is called “Gold Standard” algorithm Other algorithms can then be compared to it Other algorithms can have other advantages: faster, more reliable, etc.

Direct Linear Transformation (DLT)

Direct Linear Transformation (DLT) Equations are linear in h Only 2 out of 3 are linearly independent (indeed, 2 eq/pt) row 3 = x.(row 1)+y.(row 2) (only drop third row if wi’≠0) Holds for any homogeneous representation, e.g. (xi’,yi’,1)

Direct Linear Transformation (DLT) Solving for H size A is 8x9 or 12x9, but rank 8 Trivial solution is h=09T is not interesting 1-D null-space yields solution of interest pick for example the one with

Direct Linear Transformation (DLT) Over-determined solution No exact solution because of inexact measurement i.e. “noise” Find approximate solution Additional constraint needed to avoid 0, e.g. not possible, so minimize

Singular Value Decomposition Homogeneous least-squares

DLT algorithm Objective Given n≥4 2D to 2D point correspondences {xi↔xi’}, determine the 2D homography matrix H such that xi’=Hxi Algorithm For each correspondence xi ↔xi’ compute Ai. Usually only two first rows needed. Assemble n 2x9 matrices Ai into a single 2nx9 matrix A Obtain SVD of A. Solution for h is last column of V Determine H from h

Inhomogeneous solution Since h can only be computed up to scale, pick hj=1, e.g. h9=1, and solve for 8-vector Solve using Gaussian elimination (4 points) or using linear least-squares (more than 4 points) However, if h9=0 this approach fails also poor results if h9 close to zero Therefore, not recommended

Solutions from lines, etc. 2D homographies from 2D lines Minimum of 4 lines Minimum of 5 points or 5 planes 3D Homographies (15 dof) 2D affinities (6 dof) Minimum of 3 points or lines Conic provides 5 constraints Mixed configurations?

Cost functions Algebraic distance Geometric distance Reprojection error Comparison Geometric interpretation Sampson error

Algebraic distance DLT minimizes residual vector partial vector for each (xi↔xi’) algebraic error vector algebraic distance where Not geometrically/statistically meaningfull, but given good normalization it works fine and is very fast (use for initialization)

Geometric distance d(.,.) Euclidean distance (in image) measured coordinates estimated coordinates true coordinates d(.,.) Euclidean distance (in image) Error in one image e.g. calibration pattern Symmetric transfer error Reprojection error

Reprojection error

Outline Parameter estimation Robust estimation (RANSAC) Chapter 3 of “Multiple View Geometry in Computer Vision” by Hartley and Zisserman

Robust estimation What if set of matches contains gross outliers?

RANSAC Objective Robust fit of model to data set S which contains outliers Algorithm Randomly select a sample of s data points from S and instantiate the model from this subset. Determine the set of data points Si which are within a distance threshold t of the model. The set Si is the consensus set of samples and defines the inliers of S. If the subset of Si is greater than some threshold T, re-estimate the model using all the points in Si and terminate If the size of Si is less than T, select a new subset and repeat the above. After N trials the largest consensus set Si is selected, and the model is re-estimated using all the points in the subset Si

proportion of outliers e How many samples? Choose t so probability for inlier is α (e.g. 0.95) Or empirically Choose N so that, with probability p, at least one random sample is free from outliers. e.g. p =0.99 proportion of outliers e s 5% 10% 20% 25% 30% 40% 50% 2 3 5 6 7 11 17 4 9 19 35 13 34 72 12 26 57 146 16 24 37 97 293 8 20 33 54 163 588 44 78 272 1177

Acceptable consensus set? Typically, terminate when inlier ratio reaches expected ratio of inliers

Adaptively determining the number of samples e is often unknown a priori, so pick worst case, e.g. 50%, and adapt if more inliers are found, e.g. 80% would yield e=0.2 N=∞, sample_count =0 While N >sample_count repeat Choose a sample and count the number of inliers Set e=1-(number of inliers)/(total number of points) Recompute N from e Increment the sample_count by 1 Terminate

Robust Maximum Likelihood Estimation Previous MLE algorithm considers fixed set of inliers Better, robust cost function (reclassifies)

Other robust algorithms RANSAC maximizes number of inliers LMedS minimizes median error No threshold Needs estimate of percentage of outliers Not recommended: case deletion, iterative least-squares, etc.

Automatic computation of H Objective Compute homography between two images Algorithm Interest points: Compute interest points in each image Putative correspondences: Compute a set of interest point matches based on some similarity measure RANSAC robust estimation: Repeat for N samples (a) Select 4 correspondences and compute H (b) Calculate the distance d for each putative match (c) Compute the number of inliers consistent with H (d<t) Choose H with most inliers Optimal estimation: re-estimate H from all inliers by minimizing ML cost function with Levenberg-Marquardt Guided matching: Determine more matches using prediction by computed H Optionally iterate last two steps until convergence

Determine putative correspondences Compare interest points Similarity measure: SAD, SSD, ZNCC on small neighborhood If motion is limited, only consider interest points with similar coordinates More advanced approaches exist, based on invariance…

Example: robust computation Interest points (500/image) (640x480) #in 1-e adapt. N 6 2% 20M 10 3% 2.5M 44 16% 6,922 58 21% 2,291 73 26% 911 151 56% 43 Putative correspondences (268) (Best match,SSD<20,±320) Outliers (117) (t=1.25 pixel; 43 iterations) Inliers (151) Final inliers (262) (2 MLE-inlier cycles; d=0.23→d=0.19; IterLev-Mar=10)