Introduction to pinhole cameras
Lesson given by Sébastien Piérard in the course
“Introduction aux techniques audio et vidéo”
(ULg, Pr. J.J. Embrechts)
INTELSIG, Montefiore Institute, University of Liège, Belgium
October 30, 2013
1 / 21
Optics : the light travels along straight line segments
The light travels along straight lines if one assumes a single
material (air, glass, etc.) and a single frequency. Otherwise . . .
2 / 21
Optics : behavior of a lens
Assuming the Gauss’ assumptions, all light rays coming from the
same direction converge to a unique point on the focal plane.
3 / 21
Optics : an aperture
4 / 21
Optics : a pinhole camera
A pinhole camera is a camera with a very small aperture. The lens
becomes completely useless. The camera is just a small hole. High
exposure durations are needed due to the limited amount of light
received.
5 / 21
What is a camera ?
A camera is a function:
point in the 3D world → pixel
I
I
x
y
z
→
x
x
y
y
z
z
→
(c)
→
u v
u v
(f )
→
u v
x
y
z in the world 3D Cartesian coordinate system
x
y
z
(c)
in the 3D Cartesian coordinate system located
at the camera’s optical center (the hole), with the axis z (c)
along its optical axis, and the axis y (c) pointing upperwards.
I
I
(f )
u v
in the 2D Cartesian coordinate system locate in the
focal
plane
u v in the 2D coordinate system screen or image
6 / 21
(x y z) → (x y z)(c)
y
x
@
I
y (c)
6
z (c) @
→
−
t
@
@
1
@
@
R
@
z
@
@
@
R
@
x (c)
x (c)
x
tx
(c)
y = R3×3 y + ty
z
tz
z (c)
7 / 21
(x y z) → (x y z)(c)
x (c)
x
tx
(c)
y = R3×3 y + ty
z
tz
z (c)
R is a matrix that gives the rotation from the world coordinate
system to the camera coordinate system. The columns of R are
the base vectors of the world coordinate system expressed in the
camera coordinate system. In the following, we will assume that
the two coordinate systems are orthonormal. In this case, we have
R T R = I ⇔ R −1 = R T .
8 / 21
(x y z)(c) → (u v )(f )
@
@
s
@ s
@
@
@
(c)
y
v (f ) @ @
@ @
6
@
@ 6
@
@
@
@
(c)
z
@
@
f
R
@
R
@
@
x (c)
u (f )
@
@
@
@
@
@
@
@
9 / 21
(x y z)(c) → (u v )(f )
We suppose that the image plane is orthogonal to the optical axis.
We have :
u (f ) = x (c)
v (f ) = y (c)
f
z (c)
f
z (c)
10 / 21
(u v )(f ) → (u v )
v (f )
v
6
v0 θ
1 6
kv ?
1
ku
-u (f )
- u
u0
11 / 21
(u v )(f ) → (u v )
We have :
u = (u (f ) −
v (f )
)ku + u0
tan θ
v = v (f ) kv + v0
The parameters ku and kv are scaling factors and (u0 , v0 ) are the
coordinates of the point where the optical axis crosses the image
ku
plane. We pose suv = − tan
θ and obtain:
ku suv
su
sv = 0 kv
s
0
0
u0
su (f )
(f )
v0 sv
1
s
Often, the grid of photosensitive cells can be considered as nearly
rectangular. The parameter suv is then neglected and is considered
as 0.
12 / 21
The complete pinhole camera model
With homogeneous coordinates the pinhole model can be written
as a linear relation:
su
ku suv
kv
0
0
sv = 0
s
u0 f 0 0 0
R3×3
v0 0 f 0 0
1
0 0 1 0
0
0
su
αu Suv
⇔ sv = 0 αv
s
0
0
u0 0
R3×3
v0 0
1 0
0
0
tx
x
ty y
tz z
0 1
1
x
tx
y
ty
tz z
0 1
1
x
su
m11 m12 m13 m14
y
⇔ sv = m21 m22 m23 m24
z
m31 m32 m33 m34
s
1
with αu = f ku , αv = f kv , and Suv = f suv .
13 / 21
Questions
Question
What is the physical meaning of the homogeneous coordinates ?
Think about all concurrent lines intersection at the origin and the
three first elements of the homogeneous coordinates with (x y z)
on a sphere . . .
Question
How many degrees of freedom has M3×4 ?
(m31 m32 m33 ) is a unit vector since (m31 m32 m33 ) = (r31 r32 r33 ).
14 / 21
The calibration step: finding the matrix M3×4
15 / 21
The calibration step: finding the matrix M3×4
x
su
m11 m12 m13 m14
y
sv = m21 m22 m23 m24
z
s
m31 m32 m33 m34
1
therefore
u =
v
=
m11
m31
m21
m31
x
x
x
x
+ m12
+ m32
+ m22
+ m32
y
y
y
y
+ m13
+ m33
+ m23
+ m33
z
z
z
z
+ m14
+ m34
+ m24
+ m34
and
(m31 u − m11 )x + (m32 u − m12 )y + (m33 u − m13 )z + (m34 u − m14 )
=
0
(m31 v − m21 )x + (m32 v − m22 )y + (m33 v − m23 )z + (m34 v − m24 )
=
0
16 / 21
The calibration step: finding the matrix M3×4
x1
x2
..
.
xn
0
0
..
.
0
y1
y2
..
.
yn
0
0
..
.
0
z1
z2
..
.
zn
0
0
..
.
0
1
1
..
.
1
0
0
..
.
0
0
0
..
.
0
x1
x2
..
.
xn
0
0
..
.
0
y1
y2
..
.
yn
0
0
..
.
0
z1
z2
..
.
zn
0
0
..
.
0
1
1
..
.
1
−u1 x1
−u2 x2
..
.
−un xn
−v1 x1
−v2 x2
..
.
−vn xn
−u1 y1
−u2 y2
..
.
−un yn
−v1 y1
−v2 y2
..
.
−vn yn
−u1 z1
−u2 z2
..
.
−un zn
−v1 z1
−v2 z2
..
.
−vn zn
−u1
−u2
..
.
−un
−v1
−v2
..
.
−vn
m11
m12
m13
m14
m21
m22
m23
m24
m31
m32
m33
m34
=0
17 / 21
Questions
Question
What is the minimum value for n ?
5.5
Question
How can we solve the homogeneous system of the previous slide ?
Apply a SVD and use the vector of the matrix V corresponding the
smallest singular value.
Question
Is there a conditions on the set of 3D points used for calibrating
the camera ?
Yes, they should not be coplanar.
18 / 21
Intrinsic and extrinsic parameters
m11 m12 m13 m14
αu Suv
αv
m21 m22 m23 m24 = 0
m31 m32 m33 m34
0
0
|
{z
u0
v0 R3×3
1
}|
tx
ty
tz
{z
}
intrinsic parameters extrinsic parameters
The decomposition can be achieved via the orthonormalising
theorem of Graham-Schmidt, or via a QR decomposition since
m11 m12 m13
αu Suv
αv
m21 m22 m23 = 0
m31 m32 m33
0
0
u0 r11 r12 r13
v0 r21 r22 r23
1
r31 r32 r33
m33 m23 m13
r33 r23 r13 1 v0
⇔ m32 m22 m12 = r32 r22 r12 0 αv
m31 m21 m11
r31 r21 r11 0 0
u0
Suv
αu
19 / 21
Questions
Question
What is the minimum of points to use for recalibrating a camera
that has moved ?
3 since there are 6 degrees of freedom in the extrinsic parameters.
Question
What is this ?
20 / 21
Bibliography
D. Forsyth and J. Ponce, Computer Vision: a Modern
Approach. Prentice Hall, 2003.
R. Hartley and A. Zisserman, Multiple View Geometry in
Computer Vision, 2nd ed. Cambridge University Press, 2004.
Z. Zhang, “A flexible new technique for camera calibration,”
IEEE Transactions on Pattern Analysis and Machine
Intelligence, vol. 22, no. 11, pp. 1330–1334, 2000.
21 / 21
© Copyright 2026 Paperzz