Professional Documents
Culture Documents
Camera Projection II: Reading: T&V Section 2.4
Camera Projection II: Reading: T&V Section 2.4
Lecture 13:
Camera Projection II
Reading: T&V Section 2.4
Robert Collins
CSE486, Penn State
Recall: Imaging Geometry
W
Object of Interest
in World Coordinate
System (U,V,W)
V
U
Robert Collins
CSE486, Penn State
Imaging Geometry
Camera Coordinate
Y System (X,Y,Z).
X Z
• Z is optic axis
f • Image plane located f units
out along optic axis
• f is called focal length
Robert Collins
CSE486, Penn State
Imaging Geometry
W
Y y
X Z x
V
U
W
Y y
X Z x
V
u U
V
u U
v Pixel
Coordinates
Robert Collins
CSE486, Penn State
Forward Projection
Affine Transformation
Robert Collins
CSE486, Penn State
Intrinsic parameters
oy x v (row)
(0,0)
X Y
u f ox v f oy
Z Z
ox and oy called image center or principle point
Robert Collins
CSE486, Penn State
Intrinsic parameters
sometimes one or more coordinate axes are flipped (e.g. T&V section 2.4)
oy y
v (row)
x
(0,0)
X Y
u f ox v f oy
Z Z
Robert Collins
CSE486, Penn State
Intrinsic parameters (scales)
sampling determines how many rows/cols in the image
film scanning
resolution
pixel array
C cols x R rows
CCD
analog
resample
Robert Collins
CSE486, Penn State
Effective Scales: sx and sy
1 X 1 Y
u s f ox v f oy
x Z sy Z
Aspect ratio is sy / sx
O.Camps, PSU
Robert Collins
CSE486, Penn State
Perspective projection matrix
Adding the intrinsic parameters into the
perspective projection matrix:
X
x' f / s x 0 ox 0
y ' 0 Y
f / sy oy 0
Z
z ' 0 0 1 0
1
To verify:
x’
u 1 X Y
1
z’ u s f ox v f oy
y’ x Z sy Z
v
z’
O.Camps, PSU
Robert Collins
CSE486, Penn State
Note:
Sometimes, the image and the camera coordinate systems
have opposite orientations: [the book does it this way]
X X
f ( u o x ) s x x' f / s x 0 ox 0
Z y ' 0 Y
f / sy oy 0
Y Z
f ( v o y )s y z ' 0 0 1 0
Z 1
Robert Collins
CSE486, Penn State
Note 2
In general, I like to think of the conversion as
a separate 2D affine transformation from film
coords (x,y) to pixel coordinates (u,v):
X
u’ a11 a12 xa' 13f 0 0 0
Y
v’ a21 a22 ya' 23 0
f 0 0
w’ Z
0 0 z 1' 0 0 1 0
1
Maff Mproj
U Mext X Mint u
V Y v
W Z
U u
M
V m11 m12 m13 m14 v
W m21 m22 m23 m24
m31 m31 m33 m34
Robert Collins
CSE486, Penn State
Summary: Projection Equation
Film plane Perspective
World to camera
to pixels projection
Mint
M
Robert Collins
CSE486, Penn State
Lecture 13/14:
Intro to Image Mappings
Robert Collins
CSE486, Penn State
Image Mappings
Overview
from R.Szeliski
Robert Collins
CSE486, Penn State
Geometric Image Mappings
Geometric
image transformation transformed image
(x,y)
(x’,y’)
x’ = f(x, y, {parameters})
y’ = g(x, y, {parameters})
Robert Collins
CSE486, Penn State
Linear Transformations
(Can be written as matrices)
Geometric
image transformation transformed image
(x,y)
(x’,y’)
x’ x
y’ = M(params) y
1 1
Robert Collins
CSE486, Penn State
Translation
y y’
transform
1
ty
0
0 1 x tx x’
0 0
0 1 x 0 S x’
)
0
0 1 x x’
)
1
ty
0
0 1 x tx x’
http://planetmath.org/encyclopedia/PartitionedMatrix.html
Robert Collins
CSE486, Penn State
Partitioned Matrices
equation form
Robert Collins
PC = R P W + T
Robert Collins
CSE486, Penn State
Similarity (scaled Euclidean)
y y’ S
transform
)
1
ty
0
0 1 x tx x’
0
0 1 x x’
0
0 1 x x’
Note!
Summary of 2D Transformations
CSE486, Penn State
Robert Collins
Summary of 2D Transformations
CSE486, Penn State
Euclidean
Robert Collins
Summary of 2D Transformations
CSE486, Penn State
Similarity
Robert Collins
Summary of 2D Transformations
CSE486, Penn State
Affine
Robert Collins
Summary of 2D Transformations
CSE486, Penn State
Projective
Robert Collins
CSE486, Penn State
Summary of 2D Transformations
from R.Szeliski