Title: CS 44957495 Computer Vision
1CS 4495/7495Computer Vision
- Cameras, Geometric Cameras Models,
- and Geometric Camera Calibration
- Frank Dellaert
- Some Slides by Forsyth Ponce, Jim Rehg
Aaron Bobick
2Outline (from Frank)
- Pinhole Cameras
- Cameras with Lenses
- Homogeneous Coordinates
- Joining Points, Lines, and Planes
- Geometric Camera Model
- Intrinsic Parameters
- Extrinsic Parameters
- Projective Cameras
- Geometric Camera Calibration
3Outline (today)
- Pinhole Cameras
- Cameras with Lenses
- Homogeneous Coordinates
- Extrinsic Parameters
- Geometric Camera Model
- Intrinsic Parameters
- Joining Points, Lines, and Planes
- Projective Cameras
- Geometric Camera Calibration
4 52D Coordinate Frames Points
j
p (x,y)T
i
o
62D Lines
j
p(x,y)T
c
(a,b)T
i
7Homogeneous Coordinates
- Uniform treatment of points and lines
- Line-point incidence lTp0
j
stay the same when scaled
p(x,y,1)T(kx,kx,k)T
c
l(a,b,c)T(ka,kb,kc)T
(a,b)T
i
8But, more intuitive reason for now
- Use homogenous coordinates to combine rotation
and translation into same framework matrix
transformation. - Allows easy transformation between frames
common between vision, graphics, and robotics.
9 10Camera Pose
In order to apply the camera model, objects in
the scene must be expressed in camera coordinates.
Camera Coordinates
World Coordinates
Calibration target looks tilted from
camera viewpoint. This can be explained as
a difference in coordinate systems.
11Rigid Body Transformations
- Need a way to specify the six degrees-of-freedom
of a rigid body. - Why are their 6 DOF?
A rigid body is a collection of points whose
positions relative to each other cant change
Fix one point, three DOF
Fix second point, two more DOF (must
maintain distance constraint)
Third point adds one more DOF, for
rotation around line
12Notations
- Superscript references coordinate frame
- AP is coordinates of P in frame A
- BP is coordinates of P in frame B
- Example (also Page 23)
13Translation
14Translation
- Using homogeneous coordinates, translation can
be expressed as a matrix multiplication. - Translation is commutative
15Rotation
means describing frame A in The coordinate system
of frame B
16Rotation
Orthogonal matrix!
17Example Rotation about z axis
What is the rotation matrix?
18Combine 3 to get arbitrary rotation
- Euler angles Z, X, Z
- Heading, pitch roll world Z, new X, new Y
- Three basic matrices order matters, but well
probably not focus on that
19Rotation in homogeneous coordinates
- Using homogeneous coordinates, rotation can be
expressed as a matrix multiplication. - Rotation is not commutative
20Rigid transformations
21Rigid transformations (cont)
- Unified treatment using homogeneous coordinates.
Invertible!
22 23Perspective Camera Model
24We can see infinity !
Railroad parallel lines
25Affine Camera Model (p.33)
26 27Normalized Image coordinates
1
O
uX/Z dimensionless !
P
28Pixel units
Pixels are on a grid of a certain dimension
f
O
uk f X/Z in pixels ! f m (in
meters) k pixels/m
P
29Pixel coordinates
We put the pixel coordinate origin on topleft
f
O
uu0 k f X/Z
P
30Pixel coordinates in 2D
640
(0.5,0.5)
i
(u0,v0)
480
(640.5,480.5)
j
31Important MATLAB Convention
(1,1) !
Just as good as any other convention !
32Summary Intrinsic Calibration
5 Degrees of Freedom !
33 34Projective Camera Matrix
56 DOF 11 !
35Projective Camera Matrix
56 DOF 11 !
36Columns Rows of M
m2P0
O
37Homogeneous Coordinates (again!)
- Uniform treatment of points and lines
- Line-point incidence lTp0
j
stay the same when scaled
p(x,y,1)T(kx,kx,k)T
c
l(a,b,c)T(ka,kb,kc)T
(a,b)T
i
38Join cross product !
- Join of two lines is a pointpl1xl2
- Join of two points is a linelp1xp2
39Joining two parallel lines ?
(a,b,c)
(a,b,d)
40Points at Infinity !
(-b,a,0)T
Line at infinity linf(0,0,1)T
j
l(a,b,c)T
i
(-b,a,0)T
41In 3D Same Story
- 3D points (x,y,z,w)T
- 3D planes (a,b,c,d)T
- join of three points plane
- join of three planes point
- plane at infinity (0,0,0,1)T
42- Geometric Camera Calibration
43Affine Calibration
44Affine Calibration
45Affine Camera Matrix
Only 8 DOF !
46Inserting Synthetic Objects
pMP