Title: CS%20395/495-26:%20Spring%202003
1CS 395/495-26 Spring 2003
- IBMR Week 1B2-D Projective Geometry
- Jack Tumblin
- jet_at_cs.northwestern.edu
2Recall Scene Image
- Light 3D Scene
- Illumination, shape, movement, surface BRDF,
2D Image Collection of rays through a point
Image Plane I(x,y)
Position(x,y)
Angle(?,?)
GOAL a Reversible Mapping Scene angles?? image
positions
3View Interpolation How?
- Chapter 2 3D Projection (soon)
Find new views of that scene
From a 3D scene
view1
view2
4View Interpolation How?
- BUT FIRST, the simpler caseChapter 1 2D
Projection
Find new views of that image
From a flat 2D image,
view1
view2
5Answer 2D Homogeneous Coords
From a flat 2D image,
Find new views of that image
view1
view2
2D Homogeneous (x1 x2 x3) coordinates in P2
Cartesian (x,y) coordinates in R2
6Overview
- Project 1 1 Image-Colored Mesh Viewer
- Chapter 1 any 2D plane, as seen by
any 3D camera view (texture mapping
generalized) - Homogeneous Coordinates are Wonderful
- Everything is a Matrix
- Conics (you can skip for now)
- Aside interpolation of pixels and points
- Transform your Point of View H matrix
- Parts of H useful kinds of Transforms
72D Homogeneous Coordinates
- WHY? makes MUCH cleaner math!
- Unifies lines and points
- Puts perspective projection into matrix form
- No divide-by-zero, lines at infinity defined
But in P2, write same point x as where
in R2, write point x as
x1 x2 x3
x y
x x1 / x3, y x2 / x3, x3 anything non-zero!
(but usually defaults to 1)
(x,y)
8Homogeneous Coordinates
- WHAT?! Why x3? Why default value of 1?
- Look at lines in R2
- line all (x,y) points where
- scale by k ?? no change
- Using x3 for points UNIFIES notation
- line is a 3-vector named l
- now point (x,y) is a 3-vector too, named x
ax by c 0
kax kby kc 0
ax by c 0
a b c
0
x1 x2 x3
xT.l 0
9Useful 3D Graphics Ideas
- Every Homog. point (x1,x2,x3) describes a 3D ray
- Phantom dimension x3 is the z-buffer value
- 3D?2D hard-wired
- (Fig 1.1, pg 8)
- Homogeneous coords allows translation
matrix
Image Plane (x,y,-1)
(xmax, ymax, -1)
(0,0,-1)
An Ideal Point at (0,0,0) Center of Projection
x y 1
1 0 3 0 1 5 0 0 1
x3 y5 1
102D Homogeneous Coordinates
- Important Properties 1(see book for details)
- 3 coordinates, but only 2 degrees of
freedom(only 2 ratios (x1 / x3), (x2 / x3) can
change) - DUALITY points, lines are interchangeable
- Line Intersections point
- (a 3D cross-product)
- Point Intersections line
- Projective theorem for lines ?? theorem for
points!
l1 ? l2 x
x1 ? x2 l
11Homogeneous Coordinates
- Important Properties 2(see book for details)
- Neatly Sidesteps divide-by-zero
- in (x,y) space (R2)
- Remember, we store (x1 ,x2, x3)T, then compute
(x1 / x3), (x2 / x3) only if OK. - OK, yeah, but so what? ...
12Homogeneous Coordinates
- Why is deferring divide-by-zero so important?
- Cleanly Defines Points at Infinity or
Ideal Points (x,y,0)T - outermost pixels (/-?, /-?) of an infinite
image plane ((x,y), or R2) - (x,y,0) is an entire plane of points in the
(semi-bogus) 3D space (x1 ,x2, x3)T space - but it is a circle around infinity in
(legit) P2 projective space (x1 /x3, x2 /x3)T - Note! Center of Projection is an ideal point.
(Do outer limits of image plane wrap around to
that point?!?!)
13Homogeneous Coordinates
- Why is deferring divide-by-zero so important?
- Cleanly defines one Line at infinity l? ?
(0,0,1)T, or 0x 0y 10 - All ideal points are on l? proof?
l?(x1,x2,0)T 0 - All parallel lines Let l (a,b,c)T and l
(a,b,c)T - Any line l intersects with l? line at an ideal
point - Two parallel lines l and l always meet at an
ideal point (page 7)
14Homogeneous Coordinates
- Important Properties 3(see book for details)
- Conic Sections (in the (x,y) plane, a.k.a. R2 )
- SKIP this until a little later
- Core idea Conics are Well-Behaved in the
upcoming view-interpolations - Elegant homogeneous matrix form for any and all
conic curves (ellipse, circle, parabola,
hyperbola, degenerate lines points) - xTCx 0
- Find any conic curve from just 5 (x,y) points on
the curves image - Nice dual form exists too (analogous to
line/point duality)!
15Homogeneous Coordinates
- Important Properties 4(see book for details)
- View Interpolation (Projective Transform)
- Central image plane (x,y,-1)T
- Choose a known point x
- Apply 3x3 Matrix H to (x,y,-1)Tto make some
OTHER plane - Ray through known point x pierces unknown point
x -
3D world plane
x
x
H x x
Image Plane (x,y,-1)
(0,0,-1)
x1 x2 x3
h11 h12 h13 h21 h22 h21 h31 h32 h33
x1 x2 x3
(0,0,0)
16Projective Transform H
H matrix Plane-to-Plane mapping What if H is
unknown, but we have four or more pairs of x,x
points? (see pg 15) x1, x2, x3, x4, x1, x2,
x3, x4
x1 x2 x3
h11 h12 h13 h21 h22 h21 h31 h32 h33
x1 x2 x3
H x x
x
x
Image Plane (x,y,-1)
(0,0,-1)
(0,0,0)
17Projective Transform H
- Finding H from point pairs (correspondences)
- We know that Hx x, and
- we know at least 4 point pairs x and x that
satisfy it - ATTEMPT 1plug chug make a matrix of x and
x values
H x x
x1 x2 x3
h11 h12 h13 h21 h22 h21 h31 h32 h33
x1 x2 x3
H
x1
x1
x2
x3
x4
x2
x3
x4
18Projective Transform H
- Finding H from point pairs (correspondences)
- We know that Hx x, and
- we know at least 4 point pairs x and x that
satisfy it - ATTEMPT 1plug chug make a matrix of x and
x values
H x x
x1 x2 x3
h11 h12 h13 h21 h22 h21 h31 h32 h33
x1 x2 x3
UNKNOWN!
H
x1
x1
x2
x3
x4
x2
x3
x4
19END