Recovering structure from a single view Pinhole perspective projection

Similar documents
Lecture 9: Epipolar Geometry

Epipolar geometry. x x

Lecture 5 Epipolar Geometry

Multi-view geometry problems

Structure from motion

Two-view geometry Computer Vision Spring 2018, Lecture 10

Undergrad HTAs / TAs. Help me make the course better! HTA deadline today (! sorry) TA deadline March 21 st, opens March 15th

Epipolar Geometry and Stereo Vision

CS231M Mobile Computer Vision Structure from motion

Epipolar Geometry and Stereo Vision

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...

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

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

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

Announcements. Stereo

Camera Geometry II. COS 429 Princeton University

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

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

Epipolar Geometry and Stereo Vision

Announcements. Stereo

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

Lecture 6 Stereo Systems Multi-view geometry

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

Computer Vision Lecture 17

Computer Vision Lecture 17

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

calibrated coordinates Linear transformation pixel coordinates

CS231A Course Notes 4: Stereo Systems and Structure from Motion

Multi-View Geometry Part II (Ch7 New book. Ch 10/11 old book)

The end of affine cameras

CS201 Computer Vision Camera Geometry

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

Lecture 10: Multi-view geometry

BIL Computer Vision Apr 16, 2014

Epipolar Geometry and Stereo Vision

Structure from motion

Structure from Motion

Multiple View Geometry. Frank Dellaert

Augmented Reality II - Camera Calibration - Gudrun Klinker May 11, 2004

Cameras and Stereo CSE 455. Linda Shapiro

Unit 3 Multiple View Geometry

Epipolar Geometry Prof. D. Stricker. With slides from A. Zisserman, S. Lazebnik, Seitz

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

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

Image Rectification (Stereo) (New book: 7.2.1, old book: 11.1)

Two-View Geometry (Course 23, Lecture D)

Lecture 14: Basic Multi-View Geometry

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

Introduction à la vision artificielle X

Structure from Motion

Machine vision. Summary # 11: Stereo vision and epipolar geometry. u l = λx. v l = λy

3D Geometry and Camera Calibration

Stereo and Epipolar geometry

Structure from Motion and Multi- view Geometry. Last lecture

CS 231A Computer Vision (Winter 2015) Problem Set 2

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

6.819 / 6.869: Advances in Computer Vision Antonio Torralba and Bill Freeman. Lecture 11 Geometry, Camera Calibration, and Stereo.

1 Projective Geometry

Camera Calibration Using Line Correspondences

Robust Geometry Estimation from two Images

A Factorization Method for Structure from Planar Motion

Multiple View Geometry

Stereo Vision. MAN-522 Computer Vision

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

MAPI Computer Vision. Multiple View Geometry

Project 4 Results. Representation. Data. Learning. Zachary, Hung-I, Paul, Emanuel. SIFT and HoG are popular and successful.

Geometric camera models and calibration

Structure from motion

Computer Vision Lecture 20

Announcements. Motion. Structure-from-Motion (SFM) Motion. Discrete Motion: Some Counting

C / 35. C18 Computer Vision. David Murray. dwm/courses/4cv.

Structure from Motion

Computer Vision Lecture 20

Geometry of Multiple views

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

Computer Vision Lecture 20

Rigid Body Motion and Image Formation. Jana Kosecka, CS 482

A Real-Time Catadioptric Stereo System Using Planar Mirrors

Epipolar Geometry class 11

Rectification and Disparity

Rectification and Distortion Correction

Epipolar Geometry and the Essential Matrix

Multiple Views Geometry

Announcements. Motion. Structure-from-Motion (SFM) Motion. Discrete Motion: Some Counting

3D Reconstruction with two Calibrated Cameras

Multi-stable Perception. Necker Cube

A General Expression of the Fundamental Matrix for Both Perspective and Affine Cameras

Z (cm) Y (cm) X (cm)

Lecture 9 & 10: Stereo Vision

But First: Multi-View Projective Geometry

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

CS223b Midterm Exam, Computer Vision. Monday February 25th, Winter 2008, Prof. Jana Kosecka

Structure from Motion CSC 767

Lecture 10: Multi view geometry

CS 664 Slides #9 Multi-Camera Geometry. Prof. Dan Huttenlocher Fall 2003

Structure from Motion

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

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

COMPARATIVE STUDY OF DIFFERENT APPROACHES FOR EFFICIENT RECTIFICATION UNDER GENERAL MOTION

Final project bits and pieces

Transcription:

EPIPOLAR GEOMETRY The slides are from several sources through James Hays (Brown); Silvio Savarese (U. of Michigan); Svetlana Lazebnik (U. Illinois); Bill Freeman and Antonio Torralba (MIT), including their own slides.

Recovering structure from a single view Pinhole perspective projection P p O w Calibration rig Scene C Camera K Why is it so difficult? Intrinsic ambiguity of the mapping from 3D to image in 2D. see example...

Is this an illusion of 3D to 2D? Courtesy slide S. Lazebnik

Why multiple views? Structure and depth are inherently ambiguous from single views. P1 P2 P1 =P2 Optical center

Epipolar constraint Geometry of two views constrains where the corresponding pixel for some image point in the first view must occur in the second view. It must be carved out by a plane connecting the world point and the optical centers.

Epipolar geometry Epipolar Line Epipolar Line Epipolar Plane Epipole Baseline Epipole

Epipolar geometry: terms Baseline: line joining the camera centers. Epipole: point of intersection of baseline with image plane. Epipolar plane: plane containing baseline and world point. Epipolar line: intersection of epipolar plane with the image plane. All epipolar lines in an image intersect at the epipole... or, an epipolar plane intersects the left and right image planes in epipolar lines. Why is the epipolar constraint useful?

Epipolar constraint Reduces the correspondence problem to a 1D search in the second image along an epipolar line. Image from Andrew Zisserman

Two examples: Slide credit: Kristen Grauman

Converging cameras have finite epipoles. Figure from Hartley & Zisserman

Parallel cameras have epipoles at infinity. X at infinity e 1 x 1 x 2 at infinity e 2 O 1 O 2 Baseline intersects the image plane at infinity. Epipoles are at infinity. Epipolar lines are parallel to x axis.

In parallel cameras search is only along x coord. Figure from Hartley & Zisserman Slide credit: Kristen Grauman

Motion perpendicular to image plane

Motion perpendicular to image plane forward

Forward translation first e 2 second O 2 e 1 O 1 The epipoles have same position in both images. Epipole here is called FOE (focus of expansion).

A 3x3 matrix connects the two 2D images. This matrix is called the Essential Matrix, E when image intrinsic parameters are known the Fundamental Matrix, F more the general uncalibrated case

Essential matrix: E x T E x = l 2 - Two views of the same object - Suppose we know the camera positions and camera matrices ==> E matrix - Given a point on left image, how can we find the corresponding point on right image?

1 v u M P P 0 M K I O O p p P R, T Epipolar Constraint - E matrix T K R ' M 1 v u P M P homogeous coordinates '

P p p O R, T O M K I 0 ' K and K are known (calibrated cameras) M' ' K R T M I 0 M ' R T

In the epipolar plane we have P p p O R, T O T ( R p ) Perpendicular to epipolar plane first camera coordinates p T T (R p ) 0

Cross products can be written as matrix multiplication....verify it The matrix derived from a is skew-symmetric. The matrix is rank 2. The null vector is along the vector a.

T E is from p' to p T T p' E p = 0 Essential matrix P some denote E as from image 2 to 1 second camera coordinate p p then R and t are from image 1 to 2 O R, T O p T T (R p ) 0 p T T R p 0 X E is a rank 2 matrix! E = essential matrix (Longuet-Higgins, 1981)

Essential matrix properties X T (x_1) E x_2 = 0 calibrated x 1 l 1 l 2 e 1 e 2 x 2 O 1 O 2 E x 2 is the epipolar line associated with x 2 (l 1 = E x 2 ) E T x 1 is the epipolar line associated with x 1 (l 2 = E T x 1 ) E is singular (rank two) -- two equal singular values are one. E e 2 = 0 and E T e 1 = 0 l e = (E x ) e = 0 valid for any x E is 3x3 matrix with 5 DOF: 3(R) + 3(t) -1(scale) T 1 T 1 2 1 2

Fundamental matrix: F x l = F T x - Uncalibrated cameras. - No additional information about the scene and camera is given ==> F matrix - Given a point on left image, how can I find the corresponding point on right image?

uncalibrated camera Epipolar Constraint - F matrix P uncalibrated camera M' = K'[R t] M p R t p O O P M P u p M KI 0 v 1 homogeous coord. unknown (3x4)

F matrix derived from E matrix p K 1 p P p K 1 ' p p p O O [T]!! x p T T R p 0 (K 1 p) T 1 T R K p 0 p T K T 1 T R K p 0 p T F p 0 rank 2

T F is from p' to p T T p' F p = 0 second camera coordinate Fundamental matrix P some denote F as from image 2 to 1 p R t p then R and t are from image 1 to 2 O O p T F p (Faugeras and Luong, 1992) 0 The fundamental matrix has a projective ambiguity. Two pairs ~ ~ of camera matrices (P, P') and (P, P') give the same F if ~ ~ P = PH and P' = P'H where H is a 4x4 nonsingular matrix.

Fundamental matrix properties fundamental matrix is much more used X T (x_1) F x_2 = 0 uncalibrated x 1 x 2 e 1 e 2 O 1 O 2 F x 2 is the epipolar line associated with x 2 (l 1 = F x 2 ) F T x 1 is the epipolar line associated with x 1 (l 2 = F T x 1 ) F is singular (rank two) F e 2 = 0 and F T e 1 = 0 F is 3x3 matrix with 7 DOF: 9-1(rank 2) - 1(scale)

The eight-point algorithm of F (linear) (Hartley, 1995) x = (u, v, 1) T, x = (u, v, 1) T Minimize: N ( x T i F xi ) 2 i= 1 under the constraint F 33 = 1 can be an other F_ij constraint also

Estimating F W Homogeneous system Rank 8 If N>8 Wf 0 A non-zero solution exists (unique) Lsq. solution by SVD f 1 rank 3 solution Fˆ f

Taking into account the rank-2 constraint. p T Fˆ p 0 ^ The estimated F have full rank (det(f) 0) but F should have rank=2 instead. ^ Find F that minimizes F Fˆ 0 Frobenius norm (*) subject to det(f)=0 Taking the first two s.v. and the three equal zero. (*) Sqrt root of the sum of squares of all entries

Example of F recovery Data courtesy of R. Mohr and B. Boufama.

This are large errors... Mean errors: 10.0pixel and 9.1pixel

The problem with eight-point algorithm Poor numerical conditioning. Can be fixed by rescaling the data before estimation. Can be used for any DLT type algorithm. More sophisticated nonlinear methods after the 8-point algorithm exist, but we will not cover.

RESCALING BY NORMALIZATION You have i = 1,..., n points x i. points is x = 1 n x i n i=1 The mean of these which is translated to the origin (0, 0) by the vector x. The new coordinated of a point are x i = x i x. Compute the mean squared distance of the points from the center a 2 = 1 n x i n x i i=1 and move the square norm equal to 2 by multiplying the components of the original point 2/a. This is the scaling. The translation are the mean coordinates with opposite sign multiplied with 2/a. In the homogeneous 2D coordinates 1 0 x 2 1 T = 0 1 x 2 Tx i = a a 0 0 2 a 2D similarity transformation. 2 a (x i1 x 1 ) 2 a (x i2 x 2 ) 1

The normalized eight-point algorithm (Hartley, 1995) Center the image data at the origin, and scale it so the mean squared distance between the origin and the data points is 2 pixels. Use the eight-point algorithm to compute F from the normalized points, n_1 and n_2. Enforce the rank-2 constraint. For example, take SVD of F and throw out the smallest singular value. Transform fundamental matrix back to original units: if T and T are the normalizing transformations in the two images, than the fundamental matrix in original coordinates is T T F T. Isotropic translation (mean to origin) and scale in each image separately. -1-1 x_1 = T n_1 x_2 = T' n_2 T -T -1 (n_1) T F T' n_2 = 0 => final F given

With transformation Without transformation Mean errors: 10.0pixel and 9.1pixel Mean errors: 1.0pixel and 0.9pixel

Comparison of estimation algorithms 8-point Normalized 8-point Nonlinear least squares Av. Dist. 1 2.33 pixels 0.92 pixel 0.86 pixel Av. Dist. 2 2.18 pixels 0.85 pixel 0.80 pixel

From epipolar geometry to camera calibration Estimating the fundamental matrix is known as weak calibration. If we know the calibration matrices of the two cameras, we can estimate the essential matrix: E=K T FK (see F from E slide) The essential matrix can give us the relative rotation and translation between the cameras, with 5 point pairs.

Example: Parallel calibrated images X e 1 x 1 x 2 t e 2 y z x O 1 O 2 K 1 =K 2 = known Hint : E=? x parallel to O 1 O 2 R = I t = (T, 0, 0)

see cross-product as matrix, before X e 1 x 1 x 2 e 2 y z x O 1 O 2 0 0 0 K 1 =K 2 = known x parallel to O 1 O 2 E=? E [ t ] R 0 0 T 0 T 0

X e 1 x 1 x 2 e 2 y z x O 1 O 2 Epipolar constraint reduces to y = y In stereo vision that will be a big help.