Single-view metrology Magritte, Personal Values, 952 Many slides from S. Seitz, D. Hoiem
Camera calibration revisited What if world coordinates of reference 3D points are not known? We can use scene features such as vanishing points Vanishing line Vertical vanishing point (at infinity) Vanishing point Vanishing point Slide from Efros, Photo from Criminisi
Recall: Vanishing points image plane vanishing point v camera center line in the scene All lines having the same direction share the same vanishing point
Computing vanishing points X is a point at infinity, v is its projection: v PX The vanishing point depends only on line direction All lines having direction d intersect at X v X + + + 3 2 td z td y td x X t + + + t d t z d t y d t x / / / / 3 2 3 2 d d d X X t
Calibration from vanishing points Consider a scene with three orthogonal vanishing directions:. v. v 2 Note: v, v 2 are finite vanishing points and v 3 is an infinite vanishing point v 3
Calibration from vanishing points Consider a scene with three orthogonal vanishing directions:. v. v 2 We can align the world coordinate system with these directions v 3
Calibration from vanishing points * * * * P * * * * * * * * [ ] p p p p 2 3 4 p P(,,,) T the vanishing point in the x direction Similarly, p 2 and p 3 are the vanishing points in the y and z directions p 4 P(,,,) T projection of the origin of the world coordinate system Problem: we can only know the four columns up to independent scale factors, additional constraints needed to solve for them
Calibration from vanishing points Let us align the world coordinate system with three orthogonal vanishing directions in the scene: Each pair of vanishing points gives us a constraint on the focal length and principal point,, 3 2 e e e [ ] i i i i KRe e t K R v λ, j T i i T i i e e v K e λ R j T T i j T T T i v K K v v K RR K v
Calibration from vanishing points Cannot recover focal length, principal point is the third vanishing point Can solve for focal length, principal point
Rotation from vanishing points e λiv i K R [ ] i t KRei λ K v Re [ r r 2 r 3 ] " $ $ $ # % ' ' r ' & Thus, λ ik vi r i. Get λ i by using the constraint r i 2.
Calibration from vanishing points: Summary Solve for K (focal length, principal point) using three orthogonal vanishing points Get rotation directly from vanishing points once calibration matrix is known Advantages No need for calibration chart, 2D-3D correspondences Could be completely automatic Disadvantages Only applies to certain kinds of scenes Inaccuracies in computation of vanishing points Problems due to infinite vanishing points
Making measurements from a single image http://en.wikipedia.org/wiki/ames_room
Recall: Measuring height 5 4 3 2 5.3 Camera height 3.3 2.8
Measuring height without a ruler O Z ground plane Compute Z from image measurements Need more than vanishing points to do this
Projective invariant We need to use a projective invariant: a quantity that does not change under projective transformations (including perspective projection) What are some invariants for similarity, affine transformations?
Projective invariant We need to use a projective invariant: a quantity that does not change under projective transformations (including perspective projection) The cross-ratio of four points: P P 3 3 P P 2 P 4 P 4 P 2 P P 3 P 4 P 2 P
Measuring height C b r t H T (top of object) R (reference point) R T B R R B T scene cross ra+o t b r b v v Z Z r t image cross ra+o H R H R v Z B (bo%om of object) ground plane
Measuring height without a ruler
v z r vanishing line (horizon) v x v t H t R H v y b t r b b v v Z Z r t image cross ra+o H R b
2D lines in homogeneous coordinates Line equation: ax + by + c l T x a x where l b, x y c Line passing through two points: l x x 2 Intersection of two lines: x l l 2 What is the intersection of two parallel lines?
v z r vanishing line (horizon) v x v t H t R H v y b t r b b v v Z Z r t image cross ra+o H R b
Measurements on planes 4 3 2 2 Approach: unwarp then measure What kind of warp is this? 3 4
Image rectification p p To unwarp (rectify) an image solve for homography H given p and p how many points are necessary to solve for H?
Image rectification: example Piero della Francesca, Flagella(on, ca. 455
Application: 3D modeling from a single image J. Vermeer, Music Lesson, 662 A. Criminisi, M. Kemp, and A. Zisserman, Bringing Pictorial Space to Life: computer techniques for the analysis of paintings, Proc. Computers and the History of Art, 22 http://research.microsoft.com/en-us/um/people/antcrim/acriminisi_3d_museum.wmv
Application: 3D modeling from a single image D. Hoiem, A.A. Efros, and M. Hebert, "Automatic Photo Pop-up", SIGGRAPH 25. http://dhoiem.cs.illinois.edu/projects/popup/popup_movie_45_25.mp4
Application: Image editing Inserting synthetic objects into images: http://vimeo.com/2896254 K. Karsch and V. Hedau and D. Forsyth and D. Hoiem, Rendering Synthetic Objects into Legacy Photographs, SIGGRAPH Asia 2
Application: Object recognition D. Hoiem, A.A. Efros, and M. Hebert, "Putting Objects in Perspective", CVPR 26