Stereo and Epipolar geometry

Similar documents
Two-View Geometry (Course 23, Lecture D)

calibrated coordinates Linear transformation pixel coordinates

Computer Vision I. Announcements. Random Dot Stereograms. Stereo III. CSE252A Lecture 16

Public Library, Stereoscopic Looking Room, Chicago, by Phillips, 1923

Step-by-Step Model Buidling

Structure from Motion. Introduction to Computer Vision CSE 152 Lecture 10

Epipolar Geometry and Stereo Vision

BIL Computer Vision Apr 16, 2014

Vision par ordinateur

Multiple View Geometry

Structure from motion

Epipolar Geometry and Stereo Vision

Structure from motion

Computer Vision Lecture 17

Computer Vision Lecture 17

Epipolar Constraint. Epipolar Lines. Epipolar Geometry. Another look (with math).

Dr. Ulas Bagci

Computer Vision I. Announcement. Stereo Vision Outline. Stereo II. CSE252A Lecture 15

arxiv: v1 [cs.cv] 28 Sep 2018

CS5670: Computer Vision

Stereo Vision. MAN-522 Computer Vision

Index. 3D reconstruction, point algorithm, point algorithm, point algorithm, point algorithm, 263

Week 2: Two-View Geometry. Padua Summer 08 Frank Dellaert

Two-view geometry Computer Vision Spring 2018, Lecture 10

Today. Stereo (two view) reconstruction. Multiview geometry. Today. Multiview geometry. Computational Photography

Dense 3D Reconstruction. Christiano Gava

There are many cues in monocular vision which suggests that vision in stereo starts very early from two similar 2D images. Lets see a few...

Index. 3D reconstruction, point algorithm, point algorithm, point algorithm, point algorithm, 253

Robust Geometry Estimation from two Images

Lecture 9: Epipolar Geometry

Reminder: Lecture 20: The Eight-Point Algorithm. Essential/Fundamental Matrix. E/F Matrix Summary. Computing F. Computing F from Point Matches

Stereo Matching.

Lecture 10: Multi-view geometry

Lecture'9'&'10:'' Stereo'Vision'

Stereo II CSE 576. Ali Farhadi. Several slides from Larry Zitnick and Steve Seitz

Final project bits and pieces

Dense 3D Reconstruction. Christiano Gava

3D Computer Vision. Structure from Motion. Prof. Didier Stricker

Recap: Features and filters. Recap: Grouping & fitting. Now: Multiple views 10/29/2008. Epipolar geometry & stereo vision. Why multiple views?

Stereo. 11/02/2012 CS129, Brown James Hays. Slides by Kristen Grauman

Project 3 code & artifact due Tuesday Final project proposals due noon Wed (by ) Readings Szeliski, Chapter 10 (through 10.5)

Lecture 9 & 10: Stereo Vision

Announcements. Stereo Vision Wrapup & Intro Recognition

Homographies and RANSAC

Structure from Motion CSC 767

Recap from Previous Lecture

55:148 Digital Image Processing Chapter 11 3D Vision, Geometry

Camera Calibration. Schedule. Jesus J Caban. Note: You have until next Monday to let me know. ! Today:! Camera calibration

Lecture 10: Multi view geometry

CSE 252B: Computer Vision II

Multiple Views Geometry

Chaplin, Modern Times, 1936

55:148 Digital Image Processing Chapter 11 3D Vision, Geometry

Lecture 6 Stereo Systems Multi-view geometry

CS 4495 Computer Vision A. Bobick. Motion and Optic Flow. Stereo Matching

arxiv: v1 [cs.cv] 28 Sep 2018

Combining Appearance and Topology for Wide

Recovering structure from a single view Pinhole perspective projection

Agenda. Rotations. Camera models. Camera calibration. Homographies

Multiple View Geometry. Frank Dellaert

Epipolar Geometry CSE P576. Dr. Matthew Brown

CSCI 5980/8980: Assignment #4. Fundamental Matrix

Final Exam Study Guide CSE/EE 486 Fall 2007

3D Reconstruction from Two Views

CS 4495 Computer Vision A. Bobick. Motion and Optic Flow. Stereo Matching

Structure from Motion

Structure from Motion

CS231M Mobile Computer Vision Structure from motion

CS201 Computer Vision Camera Geometry

Model Fitting, RANSAC. Jana Kosecka

But First: Multi-View Projective Geometry

Lecture 6 Stereo Systems Multi- view geometry Professor Silvio Savarese Computational Vision and Geometry Lab Silvio Savarese Lecture 6-24-Jan-15

Stereo vision. Many slides adapted from Steve Seitz

CS 532: 3D Computer Vision 7 th Set of Notes

Correspondence and Stereopsis. Original notes by W. Correa. Figures from [Forsyth & Ponce] and [Trucco & Verri]

Structure from motion

Multiple View Geometry

Cameras and Stereo CSE 455. Linda Shapiro

Computer Vision I. Announcement

A Factorization Method for Structure from Planar Motion

CS231A Midterm Review. Friday 5/6/2016

Image correspondences and structure from motion

Unit 3 Multiple View Geometry

Computer Vision I - Algorithms and Applications: Multi-View 3D reconstruction

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science.

Miniature faking. In close-up photo, the depth of field is limited.

COMPARATIVE STUDY OF DIFFERENT APPROACHES FOR EFFICIENT RECTIFICATION UNDER GENERAL MOTION

Multi-stable Perception. Necker Cube

Introduction à la vision artificielle X

C280, Computer Vision

Application questions. Theoretical questions

EE795: Computer Vision and Intelligent Systems

Epipolar Geometry and Stereo Vision

Fundamental matrix. Let p be a point in left image, p in right image. Epipolar relation. Epipolar mapping described by a 3x3 matrix F

Epipolar geometry. x x

Last lecture. Passive Stereo Spacetime Stereo

Lecture 5 Epipolar Geometry

Structure from Motion

Perception and Action using Multilinear Forms

Video Mosaics for Virtual Environments, R. Szeliski. Review by: Christopher Rasmussen

Transcription:

Previously Image Primitives (feature points, lines, contours) Today: Stereo and Epipolar geometry How to match primitives between two (multiple) views) Goals: 3D reconstruction, recognition Jana Kosecka Stereo matching and reconstruction (canonical configuration) Epipolar Geometry (general two view setting) 2 Why Stereo Vision? 2D images project 3D points into 2D: Canonical Stereo Configuration Assumes (two) cameras Known positions and focal lengths Recover depth P center of projection 3D points on the same viewing line have the same 2D image: 2D imaging results in depth information loss O1 f O2 3 T 4 1

Random Dot Stereo-grams Depth can be recovered by triangulation Prerequisite: Finding Correspondences Autostereograms B. Julesz: showed that the depth can be perceived in the absence of any identifiable objects in correspondence Depth perception from one image Viewing trick the brain by focusing at the plane behind - match can be established perception of 3D 5 Correspondence Problem Stereo Photometric Constraint Same world point has same intensity in both images. Lambertian fronto-parallel Issues (noise, specularities, foreshortening) Two classes of algorithms: Correlation-based algorithms 6 Produce a DENSE set of correspondences Feature-based algorithms Produce a SPARSE set of correspondences 7 Difficulties ambiguities, large changes of appearance, due to change Of viewpoint, non-uniquess 8 2

Stereo Matching Comparing Windows: What if? For each scanline, for each pixel in the left image compare with every pixel on same epipolar line in right image pick pixel with minimum match cost This will never work, so: improvement match windows For each window, match to closest window on epipolar line in other image. (slides O. Camps) 9 (slides O. Camps) 10 Comparing Windows: Window size Minimize Maximize Sum of Squared Differences Cross correlation W = 3 W = 20 Effect of window size 11 Better results with adaptive window T. Kanade and M. Okutomi, A Stereo Matching Algorithm with an Adaptive Window: Theory and Experiment,, Proc. International Conference on Robotics and Automation, 1991. D. Scharstein and R. Szeliski. Stereo matching with nonlinear diffusion. International Journal of Computer Vision, 28(2):155-174, July 1998 (S. Seitz) 12 3

Stereo results Results with window correlation Data from University of Tsukuba Scene Ground truth Window-based matching (best window size) Ground truth (Seitz) (Seitz) 13 14 Results with better method More of advanced stereo (later) Ordering constraint Dynamic programming Global optimization State of the art Boykov et al., Fast Approximate Energy Minimization via Graph Cuts, International Conference on Computer Vision, September 1999. Ground truth (Seitz) 15 16 4

Two view General Configuration Motion between the two views is not known Pinhole Camera Imaging Model 3D points Image points Perspective Projection Rigid Body Motion Given two views of the scene recover the unknown camera displacement and 3D scene structure Rigid Body Motion + Persp. projection 18 Rigid Body Motion Two Views 3D Structure and Motion Recovery Euclidean transformation Measurements Corresponding points unknowns 19 Find such Rotation and Translation and Depth that the reprojection error is minimized Two views ~ 200 points 6 unknowns Motion 3 Rotation, 3 Translation - Structure 200x3 coordinates - (-) universal scale Difficult optimization problem 20 5

Notation Epipolar Geometry Cross product between two vectors in Image correspondences where Algebraic Elimination of Depth [Longuet-Higgins 81]: Essential matrix 21 Epipolar Geometry Characterization of Essential Matrix Epipolar lines Epipoles Image correspondences Essential matrix special 3x3 matrix Additional constraints Epipolar transfer (Essential Matrix Characterization) A non-zero matrix is an essential matrix iff its SVD: satisfies: with and and 23 24 6

Estimating Essential Matrix Find such Rotation and Translation that the epipolar error is minimized Space of all Essential Matrices is 5 dimensional 3 DOF Rotation, 2 DOF Translation (up to scale!) Denote Estimating Essential Matrix Solution is Eigenvector associated with the smallest eigenvalue of If degenerate configuration estimated using linear least squares unstack -> Rewrite Collect constraints from all points 25 (Project onto a space of Essential Matrices) If the SVD of a matrix is given by then the essential matrix which minimizes the Frobenius distance is given by with Pose Recovery from Essential Matrix Two view linear algorithm - summary Essential matrix (Pose Recovery) There are two relative poses with and corresponding to a non-zero matrix essential matrix. Solve the LLSE problem: Solution eigenvector associated with smallest eigenvalue of Compute SVD of F recovered from data E is 5 diml. sub. mnfld. in Project onto the essential manifold: Twisted pair ambiguity Recover the unknown pose: 27 28 7

Pose Recovery 3D Structure Recovery There are two pairs corresponding to essential matrix. There are two pairs corresponding to essential matrix. Eliminate one of the scale s unknowns Positive depth constraint disambiguates the impossible solutions Translation has to be non-zero Solve LLSE problem Points have to be in general position - degenerate configurations planar points - quadratic surface Linear 8-point algorithm Nonlinear 5-point algorithms yields up to 10 solutions 29 If the configuration is non-critical, the Euclidean structure of the points and motion of the camera can be reconstructed up to a universal scale. Alternatively recover each point depth separately 30 Example Two views Example Epipolar Geometry Point Feature Matching Camera Pose and Sparse Structure Recovery 31 32 8

Epipolar Geometry - Planar case Decomposition of H (into motion and plane normal) Plane in first camera coordinate frame Image correspondences Algebraic elimination of depth can be estimated linearly Normalization of Decomposition of H into 4 solutions Planar homography Linear mapping relating two corresponding planar points in two views 34 Uncalibrated Camera Uncalibrated Epipolar Geometry calibrated coordinates Linear transformation pixel coordinates Epipolar constraint Fundamental matrix 35 36 9

Properties of the Fundamental Matrix Epipolar Geometry for Parallel Cameras Epipolar lines Epipoles Image correspondences 37 38 Properties of the Fundamental Matrix A nonzero matrix is a fundamental matrix if has a singular value decomposition (SVD) with Estimating Fundamental Matrix Find such F that the epipolar error is minimized Pixel coordinates Fundamental matrix can be estimated up to scale for some. There is little structure in the matrix except that Denote Rewrite Collect constraints from all points 39 40 10

Two view linear algorithm 8-point algorithm Solve the LLSE problem: Solution eigenvector associated with smallest eigenvalue of Compute SVD of F recovered from data Project onto the essential manifold: Dealing with correspondences Previous methods assumed that we have exact correspondences Followed by linear least squares estimation Correspondences established either by tracking (using affine or translational flow models) Or wide-baseline matching (using scale/rotation invariant features and their descriptors) In many cases we get incorrect matches/tracks cannot be unambiguously decomposed into pose and calibration 41 42 Robust estimators for dealing with outliers The RANSAC algorithm Use robust objective function The M-estimator and Least Median of Squares (LMedS) Estimator (neither of them can tolerate more than 50% outliers) The RANSAC (RANdom SAmple Consensus) algorithm Proposed by Fischler and Bolles Popular technique used in Computer Vision community (and else where for robust estimation problems) It can tolerate more than 50% outliers Generate M (a predetermined number) model hypotheses, each of them is computed using a minimal subset of points Evaluate each hypothesis Compute its residuals with respect to all data points. Points with residuals less than some threshold are classified as its inliers The hypothesis with the maximal number of inliers is chosen. Then re-estimate the model parameter using its identified inliers. 43 44 11

RANSAC Practice RANSAC Practice The theoretical number of samples needed to ensure 95% confidence that at least one outlier free sample could be obtained. Probability that a point is an outlier Number of points per sample Probability of at least one outlier free sample The theoretical number of samples needed to ensure 95% confidence that at least one outlier free sample could be obtained. Example for estimation of essential/fundamental matrix Need at least 7 or 8 points in one sample i.e. k = 7, probability is 0.95 then the number if samples for different outlier ratio Then number of samples needed to get an outlier free sample with probability In practice we do not now the outlier ratio Solution adaptively adjust number of samples as you go along While estimating the outlier ratio 45 46 The difficulty in applying RANSAC Adaptive RANSAC Drawbacks of the standard RANSAC algorithm Requires a large number of samples for data with many outliers (exactly the data that we are dealing with) Needs to know the outlier ratio to estimate the number of samples Requires a threshold for determining whether points are inliers Various improvements to standard approaches [Torr 99, Murray 02, Nister 04, Matas 05, Sutter 05 and many others s = infinity, sample_count = 0; While s > sample_count repeat - choose a sample and count the number of inliers - set (number_of_inliers/total_number_of_points) - set s from and - increment sample_count by 1 terminate 47 48 12

Robust technique More correspondences and Robust matching Select set of putative correspondences Repeat 1. Select at random a set of 8 successful matches 2. Compute fundamental matrix 3. Determine the subset of inliers, compute distance to epipolar line 2 4. Count the number of points in the consensus set 49 RANSAC in action Inliers 50 Epipolar Geometry Outliers Epipolar geometry in two views Refined epipolar geometry using nonlinear estimation of F The techniques mentioned so far simple linear least-squares estimation methods. The obtained estimates are used as initialization for non-linear optimization methods 51 52 13

Special Motions Pure Rotation Calibrated Two views related by rotation only Projective Reconstruction Uncalibrated Case Mapping to a reference view H can be estimated Euclidean Motion Cannot be obtained in uncalibrated setting (F cannot be uniquely decomposed into R,T and K matrix) Can we still say something about 3D? Notion of the projective 3D structure (study of projective geometry) Mapping to a cylindrical surface - applications image mosaics 53 Euclidean reconstruction Projective reconstruction 54 Euclidean vs Projective reconstruction Euclidean reconstruction true metric properties of objects lenghts (distances), angles, parallelism are preserved Unchanged under rigid body transformations => Euclidean Geometry properties of rigid bodies under rigid body transformations, similarity transformation Projective reconstruction lengths, angles, parallelism are NOT preserved we get distorted images of objects their distorted 3D counterparts --> 3D projective reconstruction => Projective Geometry 55 14