Basic Mathematics of Projection
Basic Mathematics of Projection
Basic Mathematics of Projection
Administrative Stuff
Office hours
Derek: Wed 4-5pm + drop by Ian: Mon 3-4pm, Thurs 3:30-4:30pm
HW 1: out Monday
Prob1: Geometry, today and Tues Prob2: Lighting, next Thurs Prob3: Filters, following week
Todays class
Mapping between image and world coordinates
Pinhole camera model Projective geometry
Vanishing points and lines
Projection matrix
Image formation
Pinhole camera
Pinhole camera
f
First Photograph
Oldest surviving photograph
Took 8 hours on pewter plate
Stored at UT Austin
Point of observation
Projective Geometry
What is lost?
Length
Who is taller?
Which is closer?
A C B
Projective Geometry
What is lost?
Length Angles
Parallel?
Perpendicular?
Projective Geometry
What is preserved?
Straight lines are still straight
Vanishing Point
Vanishing point
Vanishing point
Use multiple lines for better accuracy but lines will not intersect at exactly the same point in practice One solution: take mean of intersecting pairs bad idea! Instead, minimize angular differences
Vanishing objects
.
f
.
Camera Center (tx, ty, tz)
X P = Y Z
u p= v
Homogeneous coordinates
Conversion
Converting to homogeneous coordinates
Homogeneous coordinates
Invariant to scaling
x kx kx x kw w k y = ky ky = y kw w w kw
Homogeneous Coordinates Cartesian Coordinates
lineij = pi p j
Intersection of two lines given by cross product of the lines qij = linei line j
Projection matrix
R,T
jw kw Ow iw
x = K[R t ] X
x: Image Coordinates: (u,v,1) K: Intrinsic Matrix (3x3) R: Rotation (3x3) t: Translation (3x1) X: World Coordinates: (X,Y,Z,1)
Original
Created
Projection matrix
x = K [I 0] X
Slide Credit: Saverese
u f wv = 0 1 0
0 f 0
x 0 0 y 0 0 z 1 0 1
x = K [I 0] X
u f wv = 0 1 0
0 f 0
u0 v0 1
x 0 y 0 z 0 1
x = K [I 0] X
u wv = 0 1 0
u0 v0 1
x 0 y 0 z 0 1
x = K [I 0] X
u wv = 0 1 0
u0 v0 1
x 0 y 0 z 0 1
t
Ow iw
kw
x = K [I t ] X
u wv = 0 1 0
x u0 1 0 0 t x y v0 0 1 0 t y z 1 0 0 1 t z 1
3D Rotation of Points
y
p
Degrees of freedom
x = K [R t ] X
5 6
u wv = 0 1 0
x tx y ty z tz 1
fxR u= + u0 zR fyR v= + v0 zR
Orthographic Projection
Special case of perspective projection
Distance from the COP to the image plane is infinite
Image World
x u 1 0 0 0 y w v = 0 1 0 0 z 1 0 0 0 1 1
Slide by Steve Seitz
0 f 0
x 0 0 y 0 0 z 0 s 1
Slide by Steve Seitz
Suppose we have two 3D cubes on the ground facing the viewer, one near, one far.
1. What would they look like in perspective? 2. What would they look like in weak perspective?
Things to remember
Vanishing line
Vanishing points and vanishing lines Pinhole camera model and camera projection matrix Homogeneous coordinates
Vanishing point
Vanishing point
x = K [R t ] X
Next class
Applications of camera model and projective geometry
Recovering the camera intrinsic and extrinsic parameters from an image Recovering size in the world Projecting from one plane to another
Questions
Adding a lens
circle of confusion
The eye
Iris - colored annulus with radial muscles Pupil - the hole (aperture) whose size is controlled by the iris
photoreceptor cells (rods and cones) in the retina
Depth of field
f / 5.6
f / 32
d fov = tan 2f
1
Film/Sensor Width
Focal length
http://en.wikipedia.org/wiki/Focal_length