Computer vision: models, learning and inference

Slides:



Advertisements
Similar presentations
Computer vision: models, learning and inference
Advertisements

Epipolar Geometry.
The fundamental matrix F
Lecture 11: Two-view geometry
3D reconstruction.
MASKS © 2004 Invitation to 3D vision Lecture 7 Step-by-Step Model Buidling.
Computer vision: models, learning and inference
Two-View Geometry CS Sastry and Yang
Two-view geometry.
Camera calibration and epipolar geometry
Structure from motion.
Computer Vision : CISC 4/689
Epipolar geometry. (i)Correspondence geometry: Given an image point x in the first view, how does this constrain the position of the corresponding point.
Structure from motion. Multiple-view geometry questions Scene geometry (structure): Given 2D point matches in two or more images, where are the corresponding.
Uncalibrated Geometry & Stratification Sastry and Yang
Epipolar Geometry and the Fundamental Matrix F
Lecture 21: Multiple-view geometry and structure from motion
Previously Two view geometry: epipolar geometry Stereo vision: 3D reconstruction epipolar lines Baseline O O’ epipolar plane.
Lecture 20: Two-view geometry CS6670: Computer Vision Noah Snavely.
3D Computer Vision and Video Computing 3D Vision Lecture 14 Stereo Vision (I) CSC 59866CD Fall 2004 Zhigang Zhu, NAC 8/203A
Projected image of a cube. Classical Calibration.
May 2004Stereo1 Introduction to Computer Vision CS / ECE 181B Tuesday, May 11, 2004  Multiple view geometry and stereo  Handout #6 available (check with.
Lec 21: Fundamental Matrix
Camera parameters Extrinisic parameters define location and orientation of camera reference frame with respect to world frame Intrinsic parameters define.
3-D Scene u u’u’ Study the mathematical relations between corresponding image points. “Corresponding” means originated from the same 3D point. Objective.
Epipolar geometry Class 5. Geometric Computer Vision course schedule (tentative) LectureExercise Sept 16Introduction- Sept 23Geometry & Camera modelCamera.
55:148 Digital Image Processing Chapter 11 3D Vision, Geometry Topics: Basics of projective geometry Points and hyperplanes in projective space Homography.
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
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.
Lecture 11 Stereo Reconstruction I Lecture 11 Stereo Reconstruction I Mata kuliah: T Computer Vision Tahun: 2010.
Multi-view geometry.
Epipolar geometry The fundamental matrix and the tensor
Projective cameras Motivation Elements of Projective Geometry Projective structure from motion Planches : –
Lecture 04 22/11/2011 Shai Avidan הבהרה : החומר המחייב הוא החומר הנלמד בכיתה ולא זה המופיע / לא מופיע במצגת.
CSCE 643 Computer Vision: Structure from Motion
Metrology 1.Perspective distortion. 2.Depth is lost.
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.
Lec 22: Stereo CS4670 / 5670: Computer Vision Kavita Bala.
Announcements Project 3 due Thursday by 11:59pm Demos on Friday; signup on CMS Prelim to be distributed in class Friday, due Wednesday by the beginning.
Geometry of Multiple Views
Affine Structure from Motion
Raquel A. Romano 1 Scientific Computing Seminar May 12, 2004 Projective Geometry for Computer Vision Projective Geometry for Computer Vision Raquel A.
A Flexible New Technique for Camera Calibration Zhengyou Zhang Sung Huh CSPS 643 Individual Presentation 1 February 25,
Two-view geometry. Epipolar Plane – plane containing baseline (1D family) Epipoles = intersections of baseline with image planes = projections of the.
EECS 274 Computer Vision Affine Structure from Motion.
Feature Matching. Feature Space Outlier Rejection.
55:148 Digital Image Processing Chapter 11 3D Vision, Geometry Topics: Basics of projective geometry Points and hyperplanes in projective space Homography.
Computer vision: models, learning and inference M Ahad Multiple Cameras
776 Computer Vision Jan-Michael Frahm & Enrique Dunn Spring 2013.
Camera Model Calibration
Uncalibrated reconstruction Calibration with a rig Uncalibrated epipolar geometry Ambiguities in image formation Stratified reconstruction Autocalibration.
Stereo March 8, 2007 Suggested Reading: Horn Chapter 13.
Lec 26: Fundamental Matrix CS4670 / 5670: Computer Vision Kavita Bala.
Computer vision: geometric models Md. Atiqur Rahman Ahad Based on: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince.
Multi-view geometry. Multi-view geometry problems Structure: Given projections of the same 3D point in two or more images, compute the 3D coordinates.
55:148 Digital Image Processing Chapter 11 3D Vision, Geometry
Computer vision: models, learning and inference
CS4670 / 5670: Computer Vision Kavita Bala Lec 27: Stereo.
René Vidal and Xiaodong Fan Center for Imaging Science
Two-view geometry Computer Vision Spring 2018, Lecture 10
Epipolar geometry.
3D Photography: Epipolar geometry
Multiple View Geometry for Robotics
Uncalibrated Geometry & Stratification
Reconstruction.
Two-view geometry.
Two-view geometry.
Multi-view geometry.
Presentation transcript:

Computer vision: models, learning and inference Chapter 16 Multiple Cameras http://research.google.com/pubs/pub37112.html http://grail.cs.washington.edu/rome/ http://grail.cs.washington.edu/projects/interior/ http://phototour.cs.washington.edu/ http://phototour.cs.washington.edu/PhotoTourismPreview-640x480.mov BigBed: http://photosynth.net/view.aspx?cid=877fce1c-4aa9-405c-8024-4fa1dce6a84f Trevi Fountain: http://photosynth.net/view.aspx?cid=8089d414-fa91-4828-b88f-df07173edee4

Structure from motion Given an object that can be characterized by I 3D points projections into J images Find Intrinsic matrix Extrinsic matrix for each of J images 3D points Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 2

Structure from motion For simplicity, we’ll start with simpler problem Just J=2 images Known intrinsic matrix Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 3

Structure Two view geometry The essential and fundamental matrices Reconstruction pipeline Rectification Multi-view reconstruction Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 4

Epipolar lines Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 5

Epipole Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 6

Special configurations Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 7

Structure Two view geometry The essential and fundamental matrices Reconstruction pipeline Rectification Multi-view reconstruction Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 8

The essential matrix The geometric relationship between the two cameras is captured by the essential matrix. Assume normalized cameras, first camera at origin. First camera: Second camera: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 9

The essential matrix First camera: Second camera: Substituting: This is a mathematical relationship between the points in the two images, but it’s not in the most convenient form. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 10

The essential matrix Take cross product with t (last term disappears) Take inner product of both sides with x2. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 11

The essential matrix The cross product term can be expressed as a matrix Defining: We now have the essential matrix relation Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 12

Properties of the essential matrix Rank 2: 5 degrees of freedom Non-linear constraints between elements Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 13

Recovering epipolar lines Equation of a line: or or Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 14

Recovering epipolar lines Equation of a line: Now consider This has the form where So the epipolar lines are Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 15

Recovering epipoles Every epipolar line in image 1 passes through the epipole e1. In other words for ALL This can only be true if e1 is in the nullspace of E. Similarly: We find the null spaces by computing , and taking the last column of and the last row of . Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 16

Decomposition of E Essential matrix: To recover translation and rotation use the matrix: We take the SVD and then we set Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 17

To get the different solutions, we mutliply t by -1 and substitute Four interpretations To get the different solutions, we mutliply t by -1 and substitute Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 18

The fundamental matrix Now consider two cameras that are not normalised By a similar procedure to before, we get the relation or where Relation between essential and fundamental Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 19

Fundamental matrix criterion Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 20

Estimation of fundamental matrix When the fundamental matrix is correct, the epipolar line induced by a point in the first image should pass through the matching point in the second image and vice-versa. This suggests the criterion If and then Unfortunately, there is no closed form solution for this quantity. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 21

The 8 point algorithm Approach: solve for fundamental matrix using homogeneous coordinates closed form solution (but to wrong problem!) Known as the 8 point algorithm Start with fundamental matrix relation Writing out in full: or Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 22

The 8 point algorithm Can be written as: where Stacking together constraints from at least 8 pairs of points, we get the system of equations Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 23

The 8 point algorithm Minimum direction problem of the form , Find minimum of subject to . To solve, compute the SVD and then set to the last column of . Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 24

Fitting concerns This procedure does not ensure that solution is rank 2. Solution: set last singular value to zero. Can be unreliable because of numerical problems to do with the data scaling – better to re-scale the data first Needs 8 points in general positions (cannot all be planar). Fails if there is not sufficient translation between the views Use this solution to start non-linear optimisation of true criterion (must ensure non-linear constraints obeyed). There is also a 7 point algorithm (useful if fitting repeatedly in RANSAC) Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 25

Structure Two view geometry The essential and fundamental matrices Reconstruction pipeline Rectification Multi-view reconstruction Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 26

Two view reconstruction pipeline Start with pair of images taken from slightly different viewpoints Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 27

Two view reconstruction pipeline Find features using a corner detection algorithm Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 28

Two view reconstruction pipeline Match features using a greedy algorithm Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 29

Two view reconstruction pipeline Fit fundamental matrix using robust algorithm such as RANSAC Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 30

Two view reconstruction pipeline Find matching points that agree with the fundamental matrix Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 31

Two view reconstruction pipeline Extract essential matrix from fundamental matrix Extract rotation and translation from essential matrix Reconstruct the 3D positions w of points Then perform non-linear optimisation over points and rotation and translation between cameras Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 32

Two view reconstruction pipeline Reconstructed depth indicated by color Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 33

Dense Reconstruction We’d like to compute a dense depth map (an estimate of the disparity at every pixel) Approaches to this include dynamic programming and graph cuts However, they all assume that the correct match for each point is on the same horizontal line. To ensure this is the case, we warp the images This process is known as rectification Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 34

Structure Two view geometry The essential and fundamental matrices Reconstruction pipeline Rectification Multi-view reconstruction Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 35

Rectification We have already seen one situation where the epipolar lines are horizontal and on the same line: when the camera movement is pure translation in the u direction. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 36

Planar rectification Apply homographies and to image 1 and 2 Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 37

Planar rectification Start with which breaks down as Move origin to center of image Rotate epipole to horizontal direction Move epipole to infinity Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 38

Planar rectification There is a family of possible homographies that can be applied to image 1 to achieve the desired effect These can be parameterized as One way to choose this, is to pick the parameter that makes the mapped points in each transformed image closest in a least squares sense: where Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 39

Before rectification Before rectification, the epipolar lines converge Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 40

After rectification After rectification, the epipolar lines are horizontal and aligned with one another Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 41

Planar rectification does not work if epipole lies within the image. Polar rectification Planar rectification does not work if epipole lies within the image. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 42

Polar rectification Polar rectification works in this situation, but distorts the image more Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 43

Dense Stereo Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 44

Structure Two view geometry The essential and fundamental matrices Reconstruction pipeline Rectification Multi-view reconstruction Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 45

Multi-view reconstruction Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 46

Multi-view reconstruction Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 47

Reconstruction from video Images taken from same camera; can also optimise for intrinsic parameters (auto-calibration) Matching points is easier as can track them through the video Not every point is within every image Additional constraints on matching: three-view equivalent of fundamental matrix is tri-focal tensor New ways of initialising all of the camera parameters simultaneously (factorisation algorithm) Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 48

Bundle Adjustment Bundle adjustment refers to process of refining initial estimates of structure and motion using non-linear optimisation. This problem has the least squares form: where: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 49

Bundle Adjustment This type of least squares problem is suited to optimisation techniques such as the Gauss-Newton method: Where The bulk of the work is inverting JTJ. To do this efficiently, we must exploit the structure within the matrix. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 50

Structure Two view geometry The essential and fundamental matrices Reconstruction pipeline Rectification Multi-view reconstruction Applications Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 51

3D reconstruction pipeline Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 52

Photo-Tourism Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 53

Volumetric graph cuts Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 54

Conclusions Given a set of a photos of the same rigid object, it is possible to build an accurate 3D model of the object and reconstruct the camera positions Ultimately relies on a large-scale non-linear optimisation procedure. Works if optical properties of the object are simple (no specular reflectance etc.) Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 55