CS131: Computer Vision: Foundations and Applications
Juan Carlos Niebles, Adrien Gaidon, Silvio Savarese
April 13, 2026
Lecture 5�Camera Models
& Geometric
Primitives�
Silvio Savarese & Jeanette Bohg
Lecture 2 -
13-Apr-26
Agenda�
Some slides in this lecture are courtesy to Profs. J. Ponce, S. Seitz, F-F Li
Silvio Savarese & Jeanette Bohg
Lecture 2 -
3D Computer Vision
Slide credit: Andreas Geiger
Silvio Savarese
Lecture 2 -
How do we see the world?
Pinhole camera
Aperture
Some history…
Milestones:
first record of camera obscura (1502)
Some history…
Milestones:
Some history…
Photography (Niépce, “La
Table Servie,” 1822)
Milestones:
Some history…
Photography (Niépce, “La
Table Servie,” 1822)
Milestones:
Let’s also not forget…
Motzu
(468-376 BC)
Aristotle
(384-322 BC)
Also: Plato, Euclid
Al-Kindi (c. 801–873)
Ibn al-Haitham
(965-1040)
Oldest existent book on geometry in China
Pinhole perspective projection
Pinhole camera
f
f = focal length
o = aperture = pinhole = center of the camera
o
Pinhole camera
Derived using similar triangles
[Eq. 1]
f
O
P = [x, z]
P’=[x’, f ]
f
i
k
Pinhole camera
[Eq. 2]
f
Kate lazuka ©
Pinhole camera
Is the size of the aperture important?
Shrinking
aperture
size
Adding lenses!
Cameras & Lenses
image
P
P’
Out of focus
Cameras & Lenses
image
P
P’
Cameras & Lenses
focal point
f
Cameras & Lenses
f
Paraxial refraction model
zo
-z
Z’
From Snell’s law:
[Eq. 3]
P = [x,y,z]
p’ = [x’,y’]
[Eq. 1]
f
Paraxial refraction model
zo
-z
Z’
From Snell’s law:
[Eq. 3]
[Eq. 4]
P = [x,y,z]
p’ = [x’,y’]
Issues with lenses: Radial Distortion
No distortion
Pin cushion
Barrel (fisheye lens)
Image magnification decreases with distance from the optical axis
13-Apr-26
Agenda�
Some slides in this lecture are courtesy to Profs. J. Ponce, S. Seitz, F-F Li
Silvio Savarese & Jeanette Bohg
Lecture 2 -
Pinhole perspective projection
Pinhole camera
f = focal length
o = center of the camera
[Eq. 1]
f
From retina plane to images
Pixels, bottom-left coordinate systems
f
Retina plane
Digital image
Coordinate systems
f
x
y
xc
yc
C’’=[cx, cy]
[Eq. 5]
Converting to pixels
x
y
xc
yc
C=[cx, cy]
: pixel
Non-square pixels
f
[Eq. 6]
Units:
k,l : pixel/m
f : m
x
y
xc
yc
C=[cx, cy]
Is this projective transformation linear?
f
[Eq. 7]
No — division by z is nonlinear
Homogeneous coordinates
homogeneous image
coordinates
homogeneous scene
coordinates
E🡪H
H🡪E
Projective transformation in the homogenous coordinate system
Projective transformation in the homogenous coordinate system
[Eq.8]
Homogenous
Euclidian
The Camera Matrix
Camera
matrix K
f
[Eq.9]
Camera Skewness
x
y
xc
yc
C=[cx, cy]
f
Degrees of freedom of K
x
y
xc
yc
C=[cx, cy]
How many degrees of freedom does K have?
f
5 degrees of freedom!
Canonical Projective Transformation
M
[Eq.10]
13-Apr-26
Lecture 2�Camera Models�
Silvio Savarese & Jeanette Bohg
Lecture 2 -
World reference system
Ow
iw
kw
jw
R,T
f
2D Translation
P
P'
t
2D Translation Equation
P
x
y
tx
ty
P’
t
2D Translation using Homogeneous Coordinates
P
x
y
tx
ty
P’
t
?
Scaling
P
P'
Scaling Equation
P
x
y
sx x
P’
sy y
Rotation
P
P'
Rotation Equations
P
x
y’
P’
θ
x’
y
How many degrees of freedom?
1
Scale + Rotation + Translation
If sx = sy, this is a
similarity
transformation
3D Translation of Points
A translation vector in 3D has 3 degrees of freedom
P
x
y
Tx
Ty
P’
T
z
I
3D Rotation of Points
Rotation around the coordinate axes, counter-clockwise:
P
x
y’
P’
x’
y
z
A rotation matrix in 3D has 3 degrees of freedom
3D Translation and Rotation
World reference system
Ow
iw
kw
jw
R,T
In 4D homogeneous coordinates:
Internal parameters
External parameters
P
P’
f
[Eq.11]
[Eq.9]
The projective transformation
Ow
iw
kw
jw
R,T
How many degrees of freedom does M have?
5 + 3 + 3 =11!
P
P’
f
[Eq.11]
The projective transformation
Ow
iw
kw
jw
R,T
E
P
P’
f
[Eq.12]
Theorem (Faugeras, 1993)
[Eq.13]
Properties of projective transformations
Properties of Projection
Parallel lines in the world intersect in the image at a “vanishing point”
Horizon line (vanishing line)
One-point perspective
Credit slide S. Lazebnik
Next lecture
Supplemental material
Thin Lenses
Snell’s law:
n1 sin α1 = n2 sin α2
Small angles:
n1 α1 ≈ n2 α2
n1 = n (lens)
n1 = 1 (air)
zo
Focal length
[FP] sec 1.1, page 8.
Horizon line (vanishing line)
horizon