10.3 Perspective camera model
10.3.1 Homogeneous coordinates and projective geometry
Euclidean geometry is algebraically represented by the Cartesian coordinate system, in which
points are defined by tuples of numbers. Each number is related to one axis and a set of
axes determines the dimension. This representation is a very natural way of describing our
3D world and is very useful in image processing to describe pixels in two-dimensional (2D)
images. Cartesian coordinates are convenient to describe angles and lengths and they are simply
transformed by matrix algebra to represent translations, rotations and changes of scale. However,
the relationship defined by projections cannot be described with the same algebraic simplicity.
Projective geometry is algebraically represented by the homogeneous coordinate system. This
representation is a natural way of formulating how we relate camera coordinates to ‘real-world’
coordinates: the relation between image and physical space. Its major advantages are that image
transformations such as rotations, change of scale and projections become matrix multiplications.
Projections provide perspective, which corresponds to the distance of objects and affects their
size in the image.
It is possible to map points from Cartesian coordinates into the homogeneous coordinates.
The 2D point with Cartesian coordinates
x
c
=
xy
T
(10.1)
is mapped into homogeneous coordinates to the point
x
h
=
wx wy w
T
(10.2)
where w is an arbitrary scalar. Notice that a point in Cartesian coordinates is mapped into several
points in homogeneous coordinates; one point for any value of w. This is why homogeneous
coordinates are also called redundant coordinates. We can use the definition in Equation 10.2
to obtain a mapping from homogeneous coordinates to Cartesian coordinates. That is,
x = wx/w and y =wy/w (10.3)
The homogeneous representation can be extended to any dimension. For example, a 3D point
in Cartesian coordinates
x
c
=
xyz
T
(10.4)
is mapped into homogeneous form as
x
h
=
wx wy wz w
T
(10.5)
This point is mapped back to Cartesian coordinates by
x = wx/w y = wy/w and z =wz/w (10.6)
Although it is possible to map points from Cartesian coordinates to homogeneous coordinates and
vice versa, points in both systems define different geometric spaces. Cartesian coordinates define
the Euclidean space and the points in homogeneous coordinates define the projective space. The
projective space distinguishes a particular class of points defined when the last coordinate is
zero. These are known as ideal points, and to understand them we need to understand how a
line is represented in projective space. This is related to the concept of duality.
Appendix 2: Camera geometry fundamentals 357

Get Feature Extraction & Image Processing, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.