Download presentation
Presentation is loading. Please wait.
1
Email list – let me know if you have NOT been getting mail Assignment hand in procedure –web page –at least 3 panoramas: »(1) sample sequence, (2) w/Kaidan, (3) handheld –hand procedure will be posted online Readings for Monday (via web site) Seminar on Thursday, Jan 18 Ramin Zabih: “Energy Minimization for Computer Vision via Graph Cuts “ Correction to radial distortion term Announcements
2
Today Single View Modeling Projective Geometry for Vision/Graphics on Monday (1/22) camera pose estimation and calibration bundle adjustment nonlinear optimization
3
3D Modeling from a Photograph
4
Shape from X Shape from shading Shape from texture Shape from focus Others… Make strong assumptions – limited applicability Lee & Kau 91 (from survey by Zhang et al., 1999)
5
Model-Based Techniques Blanz & Vetter, Siggraph 1999 Model-based reconstruction Acquire a prototype face, or database of prototypes Find best fit of prototype(s) to new image
6
User Input + Projective Geometry Horry et al., “Tour Into the Picture”, SIGGRAPH 96 Criminisi et al., “Single View Metrology”, ICCV 1999 Shum et al., CVPR 98 Images above by Jing Xiao, CMU
7
Projective Geometry for Vision & Graphics Uses of projective geometry Drawing Measurements Mathematics for projection Undistorting images Focus of expansion Camera pose estimation, match move Object recognition via invariants Today: single-view projective geometry Projective representation Point-line duality Vanishing points/lines Homographies The Cross-Ratio Later: multi-view geometry
8
1234 1 2 3 4 Measurements on Planes Approach: unwarp then measure
9
Planar Projective Transformations Perspective projection of a plane lots of names for this: –homography, texture-map, colineation, planar projective map Easily modeled using homogeneous coordinates Hpp’ To apply a homography H compute p’ = Hp p’’ = p’/s normalize by dividing by third component
10
Image Rectification To unwarp (rectify) an image solve for H given p’’ and p solve equations of the form: sp’’ = Hp –linear in unknowns: s and coefficients of H –need at least 4 points
11
(0,0,0) The Projective Plane Why do we need homogeneous coordinates? represent points at infinity, homographies, perspective projection, multi-view relationships What is the geometric intuition? a point in the image is a ray in projective space (sx,sy,s) Each point (x,y) on the plane is represented by a ray (sx,sy,s) –all points on the ray are equivalent: (x, y, 1) (sx, sy, s) image plane (x,y,1) y x z
12
Projective Lines What is a line in projective space? A line is a plane of rays through origin all rays (x,y,z) satisfying: ax + by + cz = 0 A line is also represented as a homogeneous 3-vector l lp
13
l Point and Line Duality A line l is a homogeneous 3-vector (a ray) It is to every point (ray) p on the line: l p=0 p1p1 p2p2 What is the intersection of two lines l 1 and l 2 ? p is to l 1 and l 2 p = l 1 l 2 Points and lines are dual in projective space every property of points also applies to lines l1l1 l2l2 p What is the line l spanned by rays p 1 and p 2 ? l is to p 1 and p 2 l = p 1 p 2 l is the plane normal
14
Ideal points and lines Ideal point (“point at infinity”) p (x, y, 0) – parallel to image plane It has infinite image coordinates (sx,sy,0) y x z image plane Ideal line l (a, b, 0) – parallel to image plane Corresponds to a line in the image (finite coordinates) (sx,sy,0) y x z image plane
15
Homographies of Points and Lines Computed by 3x3 matrix multiplication To transform a point: p’ = Hp To transform a line: lp=0 l’p’=0 –0 = lp = lH -1 Hp = lH -1 p’ l’ = lH -1 –lines are transformed by premultiplication of H -1
16
3D Projective Geometry These concepts generalize naturally to 3D Homogeneous coordinates –Projective 3D points have four coords: P = (X,Y,Z,W) Duality –A plane L is also represented by a 4-vector –Points and planes are dual in 3D: L P=0 Projective transformations –Represented by 4x4 matrices T: P’ = TP, L’ = L T -1 However Can’t use cross-products in 4D. We need new tools –Grassman-Cayley Algebra »generalization of cross product, allows interactions between points, lines, and planes via “meet” and “join” operators –Won’t get into this stuff today
17
3D to 2D: “Perspective” Projection Matrix Projection: It’s useful to decompose into T R project A projectionintrinsicsorientationposition
18
Projection Models Orthographic Weak Perspective Affine Perspective Projective
19
Properties of Projection Preserves Lines and conics Incidence Invariants (cross-ratio) Does not preserve Lengths Angles Parallelism
20
Preliminaries--Projective Geometry Vanishing Points Points at Infinity Vanishing Lines The Cross-Ratio
21
Vanishing Points Vanishing point projection of a point at infinity image plane camera center ground plane vanishing point
22
Vanishing Points (2D) image plane camera center line on ground plane vanishing point
23
Vanishing Points Properties Any two parallel lines have the same vanishing point The ray from C through v point is parallel to the lines An image may have more than one vanishing point image plane camera center C line on ground plane vanishing point V line on ground plane
24
Vanishing Lines Multiple Vanishing Points Any set of parallel lines on the plane define a vanishing point The union of all of these vanishing points is the horizon line –called vanishing line in the Criminisi paper Note that different planes define different vanishing lines v1v1 v2v2
25
Vanishing Lines Multiple Vanishing Points Any set of parallel lines on the plane define a vanishing point The union of all of these vanishing points is the horizon line –called vanishing line in the Criminisi paper Note that different planes define different vanishing lines
26
Computing Vanishing Points Properties P is a point at infinity, v is its projection They depend only on line direction Parallel lines P 0 + tD, P 1 + tD intersect at X V P0P0 D
27
Computing Vanishing Lines Properties l is intersection of horizontal plane through C with image plane Compute l from two sets of parallel lines on ground plane All points at same height as C project to l Provides way of comparing height of objects in the scene ground plane l C
28
Fun With Vanishing Points
29
Perspective Cues
32
Comparing Heights VanishingPoint
33
Measuring Height 1 2 3 4 5 5.4 2.8 3.3 Camera height
34
A Computing Vanishing Points Intersection of Two or More Lines Lines A 1 + tD 1,..., A n + tD n (D i unit vectors) Minimize sum squared distance to all lines v1v1 DiDi X X-AX-A (I-DD T )(X-A) DD T (X-A)
35
C Measuring Height Without a Ruler ground plane Compute Y from image measurements Need more than vanishing points to do this Y
36
The Cross Ratio A Projective Invariant Something that does not change under projective transformations (including perspective projection) P1P1 P2P2 P3P3 P4P4 The Cross-Ratio of 4 Collinear Points Can permute the point ordering 4! = 24 different orders (but only 6 distinct values) This is the fundamental invariant of projective geometry likely that all other invariants derived from cross-ratio
37
vZvZ vLvL t b Image Cross Ratio Measuring Height B (bottom of object) T (top of object) L (height of camera on the this line) ground plane Y C Scene Cross Ratio
38
Eliminating and yields Can calculate given a known height in scene t C Measuring Height reference plane Algebraic Derivation b Y
39
So Far Can measure Positions within a plane Height –More generally—distance between any two parallel planes These capabilities provide sufficient tools for single-view modeling To do: Compute camera projection matrix
40
C Measurements Within Reference Plane Planar Perspective Map (homography) H H Maps reference plane X-Y coords to image plane u-v coords Fully determined from 4 known points on ground plane –Option A: physically measure 4 points on ground –Option B: find a square, guess the size –Option C: Note H = [av X bv Y l] (columns 1,2,4 of ) »play with scale factors a and b until the model “looks right” Given u-v, can find X-Y by H -1 reference plane
41
C Measurements Within Parallel Plane Planar Perspective Map (homography) H Z H Z Maps X-Y-Z coords to image plane u-v coords reference plane Z Given u-v, can find X-Y by H Z -1 Another way is to first map parallel plane to reference plane: –parallel planes related by a homology (5 parameter homography) –Ĥ = H Z H -1 = I + Z v Z T l –maps u-v coords on parallel plane to u-v coords on ref. plane
42
Vanishing Points and Projection Matrix Not So Fast! We only know v’s up to a scale factor Can fully specify by providing 3 reference lengths = v x (X vanishing point)
43
Single View Metrology A. Criminisi, I. Reid and A. Zisserman (ICCV 99) Make scene measurements from a single image Application: 3D from a single image Assumptions 1 3 orthogonal sets of parallel lines 2 4 known points on ground plane 3 1 height in the scene Can still get an affine reconstruction without 2 and 3
44
Criminisi et al., ICCV 99 Complete approach Load in an image Click on parallel lines defining X, Y, and Z directions Compute vanishing points Specify points on reference plane, ref. height Compute 3D positions of several points Create a 3D model from these points Extract texture maps Output a VRML model
45
3D Modeling from a Photograph
47
Conics Conic (= quadratic curve) Defined by matrix equation Can also be defined using the cross-ratio of lines “Preserved” under projective transformations –Homography of a circle is a… –3D version: quadric surfaces are preserved Other interesting properties (Sec. 23.6 in Mundy/Zisserman) –Tangency –Bipolar lines –Silhouettes
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.