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.

Slides:



Advertisements
Similar presentations
Projective 3D geometry class 4
Advertisements

3D Geometry for Computer Graphics
1 A camera is modeled as a map from a space pt (X,Y,Z) to a pixel (u,v) by ‘homogeneous coordinates’ have been used to ‘treat’ translations ‘multiplicatively’
The Trifocal Tensor Multiple View Geometry. Scene planes and homographies plane induces homography between two views.
Projective Geometry- 3D
Two-View Geometry CS Sastry and Yang
Jan-Michael Frahm, Enrique Dunn Spring 2012
Recovering metric and affine properties from images
Camera Models CMPUT 498/613 Richard Hartley and Andrew Zisserman, Multiple View Geometry, Cambridge University Publishers, 2000 Readings: HZ Ch 6, 7.
Part 1: The 2D projective plane and it’s applications Martin Jagersand CMPUT 613 Non-Euclidean Geometry for Computer Vision.
Recovering metric and affine properties from images
Multiple View Geometry
Some useful linear algebra. Linearly independent vectors span(V): span of vector space V is all linear combinations of vectors v i, i.e.
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.
Used slides/content with permission from
Parameter estimation class 5 Multiple View Geometry Comp Marc Pollefeys.
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.
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
Parameter estimation class 6 Multiple View Geometry Comp Marc Pollefeys.
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
Multiple View Geometry
Projective 3D geometry. Singular Value Decomposition.
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 Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
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.
Algorithm Evaluation and Error Analysis class 7 Multiple View Geometry Comp Marc Pollefeys.
Lecture 10: Robust fitting CS4670: Computer Vision Noah Snavely.
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.
Epipolar geometry Class 5. Geometric Computer Vision course schedule (tentative) LectureExercise Sept 16Introduction- Sept 23Geometry & Camera modelCamera.
Fitting.
Multi-view geometry. Multi-view geometry problems Structure: Given projections of the same 3D point in two or more images, compute the 3D coordinates.
Projective Geometry and Camera Models
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.
Introduction à la vision artificielle III Jean Ponce
Robot Vision SS 2008 Matthias Rüther 1 ROBOT VISION Lesson 2: Projective Geometry Matthias Rüther Slides courtesy of Marc Pollefeys Department of Computer.
Epipolar geometry The fundamental matrix and the tensor
Homogeneous Coordinates (Projective Space) Let be a point in Euclidean space Change to homogeneous coordinates: Defined up to scale: Can go back to non-homogeneous.
Computer Vision The 2D projective plane and it’s applications HZ Ch 2. In particular: Ch 2.1-4, 2.7, Szelisky: Ch 2.1.1, Estimation:HZ: Ch ,
Projective 3D geometry class 4
Multiview Geometry and Stereopsis. Inputs: two images of a scene (taken from 2 viewpoints). Output: Depth map. Inputs: multiple images of a scene. Output:
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.
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.
Day x 5-10 minute quiz SVD demo review of metric rectification algorithm 1.build a 2x3 matrix A from orthog line pairs A = [L1M1, L1M2+L2M1, L2M2; L1’M1’,
A Flexible New Technique for Camera Calibration Zhengyou Zhang Sung Huh CSPS 643 Individual Presentation 1 February 25,
ROBOT VISION Lesson 4: Camera Models and Calibration Matthias Rüther Slides partial courtesy of Marc Pollefeys Department of Computer Science University.
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.
Projective 2D geometry course 2 Multiple View Geometry Comp Marc Pollefeys.
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
Homogeneous Coordinates (Projective Space)
Parameter estimation class 5
Two-view geometry Computer Vision Spring 2018, Lecture 10
Epipolar geometry.
3D Photography: Epipolar geometry
Estimating 2-view relationships
Calibration and homographies
Back to equations of geometric transformations
Parameter estimation class 6
Image Stitching Linda Shapiro ECE/CSE 576.
Image Stitching Linda Shapiro ECE P 596.
Presentation transcript:

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

Robot Vision SS 2005 Matthias Rüther 2 Content  Projective geometry in 3D –Points –Planes –Lines –Points from planes, planes from points –Hierarchy of transformations / invariants  Parameter Estimation –Problem: intersecting lines -> SVD –Problem: rectification –Normalization –Robust Estimation  Algorithm Evaluation –Error measures

Robot Vision SS 2005 Matthias Rüther 3 Projective 3D Geometry  Points, lines, planes and quadrics  Transformations

Robot Vision SS 2005 Matthias Rüther 4 3D points in R 3 in P 3 (4x4-1=15 dof) projective transformation 3D point

Robot Vision SS 2005 Matthias Rüther 5 Planes Dual: points ↔ planes, lines ↔ lines 3D plane Euclidean representation Transformation

Robot Vision SS 2005 Matthias Rüther 6 Planes from points (solve as right nullspace of ) Or implicitly from coplanarity condition

Robot Vision SS 2005 Matthias Rüther 7 Points from planes (solve as right nullspace of ) Representing a plane by its span

Robot Vision SS 2005 Matthias Rüther 8 Lines Example: X -axis (4dof)

Robot Vision SS 2005 Matthias Rüther 9 Points, lines and planes

Robot Vision SS 2005 Matthias Rüther 10 Plücker matrices Plücker matrix (4x4 skew-symmetric homogeneous matrix) 1.L has rank 2 2.4dof 3.generalization of 4. L independent of choice A and B 5.Transformation Example: x -axis

Robot Vision SS 2005 Matthias Rüther 11 Plücker matrices Dual Plücker matrix L * Correspondence Join and incidence (plane through point and line) (point on line) (intersection point of plane and line) (line in plane) (coplanar lines)

Robot Vision SS 2005 Matthias Rüther 12 Plücker line coordinates on Klein quadric

Robot Vision SS 2005 Matthias Rüther 13 Plücker line coordinates (Plücker internal constraint) (two lines intersect)

Robot Vision SS 2005 Matthias Rüther 14 Estimation  2D Problem: Lines l 1, l 2, l 3 intersect in a point l1l1 l2l2 l3l3 ?? Point of intersection x x How many solutions exist? When does a solution exist? Geometric interpretation?  Solve equation system:

Robot Vision SS 2005 Matthias Rüther 15 Estimation  Practical 2D Problem: measured lines l 1, l 2, l 3, … l m approximately intersect in a point x l1l1 l2l2 l3l3 ?? Point of intersection x x Find a solution that minimizes |Lx|. lmlm  Find an approximate solution to the system:

Robot Vision SS 2005 Matthias Rüther 16 Singular Value Decomposition (SVD)  SVD: algorithm that decomposes A mxn (m  n) to  Properties: –U has orthogonal columns: U T U = I –U is norm-preserving: |Ux| = |x| –D is diagonal, diagonal elements are the singular values –V is orthogonal: V T V = I

Robot Vision SS 2005 Matthias Rüther 17 Singular Value Decomposition (SVD)  Solve Ax=0  minimize |Ax| subject to |x|=1:  minimize |DV T x| subject to |V T x|=1 1 is in the same row as the smallest singular value in D. X is the column of V corresponding to the smallest Singular Value.

Robot Vision SS 2005 Matthias Rüther 18 Robust Estimation  Practical 2D Problem: SVD obtains an optimal least squares solution: l1l1 l2l2 l3l3 x  Problem with outliers: l1l1 l2l2 l3l3 x l4l4

Robot Vision SS 2005 Matthias Rüther 19 RANdom SAmple Consensus  RANSAC algorithm: given a set of lines l 1,…,l m, find an intersection point x such that |l k x| is minimal for k=1..m, subject to the condition that none of the valid lines deviates from x by more than t. l1l1 l2l2 l3l3 x l4l4 t lmlm

Robot Vision SS 2005 Matthias Rüther 20 RANSAC Objective Robust fit of model to data set S which contains outliers Algorithm (i)Randomly select a sample of s data points from S and instantiate the model from this subset. (ii)Determine the set of data points S i which are within a distance threshold t of the model. The set S i is the consensus set of samples and defines the inliers of S. (iii)If the subset of S i is greater than some threshold T, re- estimate the model using all the points in S i and terminate (iv)If the size of S i is less than T, select a new subset and repeat the above. (v)After N trials the largest consensus set S i is selected, and the model is re-estimated using all the points in the subset S i

Robot Vision SS 2005 Matthias Rüther 21 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 P (x i =PX i )  Fundamental matrix Given a set of (x i,x i ’), compute F (x i ’ T Fx i =0 x1x1 x2x2 x3x3 x4x4 x1‘x1‘ x2‘x2‘ x3‘x3‘ x4‘x4‘ ?H?

Robot Vision SS 2005 Matthias Rüther 22 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

Robot Vision SS 2005 Matthias Rüther 23 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

Robot Vision SS 2005 Matthias Rüther 24 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

Robot Vision SS 2005 Matthias Rüther 25 Direct Linear Transformation (DLT)

Robot Vision SS 2005 Matthias Rüther 26 Direct Linear Transformation (DLT)  Equations are linear in h  Only 2 out of 3 are linearly independent (indeed, 2 eq/pt) (only drop third row if w i ’≠0)  Holds for any homogeneous representation, e.g. ( x i ’, y i ’,1)

Robot Vision SS 2005 Matthias Rüther 27 Direct Linear Transformation (DLT)  Solving for H size A is 8x9 or 12x9, but rank 8 Trivial solution is h =0 9 T is not interesting 1-D null-space yields solution of interest pick for example the one with

Robot Vision SS 2005 Matthias Rüther 28 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

Robot Vision SS 2005 Matthias Rüther 29 DLT algorithm Objective Given n≥4 2D to 2D point correspondences {x i ↔x i ’}, determine the 2D homography matrix H such that x i ’=Hx i Algorithm (i)For each correspondence x i ↔x i ’ compute A i. Usually only two first rows needed. (ii)Assemble n 2x9 matrices A i into a single 2 n x9 matrix A (iii)Obtain SVD of A. Solution for h is last column of V (iv)Determine H from h

Robot Vision SS 2005 Matthias Rüther 30 Inhomogeneous solution Since h can only be computed up to scale, pick h j =1, e.g. h 9 =1, and solve for 8-vector Solve using Gaussian elimination (4 points) or using linear least-squares (more than 4 points) However, if h 9 =0 this approach fails also poor results if h 9 close to zero Therefore, not recommended Note h 9 =H 33 =0 if origin is mapped to infinity