An Intro duction to Pro jective Geometry
for computer vision
Stan Birch eld
1 Intro duction
We are all familiar with Euclidean geometry and with the fact that it describ es our three-
dimensional world so well. In Euclidean geometry, the sides of ob jects have lengths, inter-
secting lines determine angles b etween them, and two lines are said to b e parallel if they
lie in the same plane and never meet. Moreover, these prop erties do not change when the
Euclidean transformations translation and rotation are applied. Since Euclidean geome-
try describ es our world so well, it is at rst tempting to think that it is the only typ e of
geometry. Indeed, the word geometry means \measurement of the earth." However, when
we consider the imaging pro cess of a camera, it b ecomes clear that Euclidean geometry is
insucient: Lengths and angles are no longer preserved, and parallel lines mayintersect.
Euclidean geometry is actually a subset of what is known as projective geometry.In
fact, there are two geometries b etween them: similarity and ane.To see the relationships
between these di erent geometries, consult Figure 1. Pro jective geometry mo dels well the
imaging pro cess of a camera b ecause it allowsamuch larger class of transformations than
just translations and rotations, a class which includes p ersp ective pro jections. Of course,
the drawback is that fewer measures are preserved | certainly not lengths, angles, or
parallelism. Pro jective transformations preservetyp e that is, p oints remain p oints and
lines remain lines, incidence that is, whether a p oint lies on a line, and a measure known
as the cross ratio, which will b e describ ed in section 2.4.
Pro jective geometry exists in anynumb er of dimensions, just like Euclidean geometry.
1
For example the pro jective line, whichwe denote by P , is analogous to a one-dimensional
2
Euclidean world; the pro jective plane, P , corresp onds to the Euclidean plane; and pro-
3
jective space, P , is related to three-dimensional Euclidean space. The imaging pro cess is
3 2
a pro jection from P to P , from three-dimensional space to the two-dimensional image
plane. Because it is easier to grasp the ma jor concepts in a lower-dimensional space, we
2
will sp end the bulk of our e ort, indeed all of section 2, studying P , the pro jective plane.
That section presents many concepts which are useful in understanding the image plane and
3
whichhave analogous concepts in P . The nal section then brie y discusses the relevance
of pro jective geometry to computer vision, including discussions of the image formation
equations and the Essential and Fundamental matrices.
1
March 12, A.D. 1998
Euclidean similarity ane pro jective
Transformations
rotation X X X X
translation X X X X
X X X uniform scaling
nonuniform scaling X X
X X shear
p ersp ective pro jection X
X comp osition of pro jections
Invariants
length X
angle X X
ratio of lengths X X
X X X parallelism
incidence X X X X
cross ratio X X X X
Figure 1: The four di erent geometries, the transformations allowed in each, and the mea-
sures that remain invariant under those transformations.
The purp ose of this monograph will b e to provide a readable intro duction to the eld
of pro jective geometry and a handy reference for some of the more imp ortant equations.
The rst-time reader may nd some of the examples and derivations excessively detailed,
but this thoroughness should prove helpful for reading the more advanced texts, where the
details are often omitted. For further reading, I suggest the excellent book byFaugeras [2]
and app endix by Mundy and Zisserman [5].
2 The Pro jective Plane
2.1 Four mo dels
There are four ways of thinking ab out the pro jective plane [3]. The most imp ortant of these
for our purp oses is homogeneous co ordinates, a concept which should b e familiar to anyone
who has taken an intro ductory course in rob otics or graphics. Starting with homogeneous
co ordinates, and pro ceeding to each of the other three mo dels, we will attempt to gain
intuition on the nature of the pro jective plane, whose concise de nition will then emerge
from the fourth mo del. 2
2.1.1 Homogeneous co ordinates
Supp ose wehaveapointx; y in the Euclidean plane. To represent this same p ointin
1
the pro jective plane, we simply add a third co ordinate of 1 at the end: x; y ; 1. Overall
scaling is unimp ortant, so the p ointx; y ; 1 is the same as the p oint x; y ; , for any
nonzero . In other words,
X; Y ; W = X ; Y ; W
for any 6= 0 Thus the p oint0; 0; 0 is disallowed. Because scaling is unimp ortant,
the co ordinates X; Y ; W are called the homogeneous coordinates of the p oint. In our
discussion, we will use capital letters to denote homogeneous co ordinates of p oints, and
we will use the co ordinate notation X; Y ; W interchangeably with the vector notation
T
[X; Y ; W ] .
To represent a line in the pro jective plane, we b egin with a standard Euclidean formula
for a line
ax + by + c =0;
and use the fact that the equation is una ected by scaling to arrive at the following:
aX + bY + cW = 0
T T
u p = p u = 0; 1
T T
where u =[a; b; c] is the line and p =[X; Y ; W ] is a p oint on the line. Thus we see that
p oints and lines have the same representation in the pro jective plane. The parameters of
a line are easily interpreted: a=b is the slop e, c=a is the x-intercept, and c=b is the
y -intercept.
To transform a p oint in the pro jective plane backinto Euclidean co ordinates, we sim-
ply divide by the third co ordinate: x; y = X=W;Y=W. Immediately we see that the
pro jective plane contains more p oints than the Euclidean plane, that is, p oints whose third
co ordinate is zero. These p oints are called ideal points,orpoints at in nity. There is a sep-
arate ideal p oint asso ciated with each direction in the plane; for example, the p oints 1; 0; 0
and 0; 1; 0 are asso ciated with the horizontal and vertical directions, resp ectively. Ideal
2
p oints are considered just likeany other p ointinP and are given no sp ecial treatment.
All the ideal p oints lie on a line, called the ideal line, or the line at in nity, which, once
again, is treated just the same as any other line. The ideal line is represented as 0; 0; 1.
Supp ose wewant to nd the intersection of two lines. By elementary algebra, the
two lines u =a ;b ;c and u =a ;b ;c are found to intersect at the p oint p =
1 1 1 1 2 2 2 2
b c b c ;a c a c ;a b a b . This formula is more easily rememb ered as the cross
1 2 2 1 2 1 1 2 1 2 2 1
pro duct: p = u u . If the two lines are parallel, i.e., a =b = a =b , the p ointof
1 2 1 1 2 2
intersection is simply b c b c ;a c a c ; 0, which is the ideal p oint asso ciated with
1 2 2 1 2 1 1 2
the direction whose slop e is a =b . Similarly, given two p oints p and p , the equation of
1 1 1 2
the line passing through them is given by u = p p .
1 2
1
In general, a p ointinann-dimensional Euclidean space is represented as a p ointinann + 1-dimensional
pro jective space. 3
p oint p =X; Y ; W line u =a; b; c
T T
incidence p u =0 incidence p u =0
collinearity j p p p j =0 concurrence j u u u j =0
1 2 3 1 2 3
join of 2 u = p p intersection p = u u
1 2 1 2
p oints of 2 lines
ideal p oints X; Y ; 0 ideal line 0; 0;c
a b
Figure 2: Summary of homogeneous co ordinates: a p oints, and b lines.
Now supp ose wewant to determine whether three p oints p , p , and p lie on the same
1 2 3
line. The line joining the rst two p oints is p p . The third p oint then lies on the line
1 2
T
if p p p = 0, or, more succinctly, if the determinant of the 3 3 matrix containing
1 2
3
the p oints is zero:
det [ p p p ]= 0:
1 2 3
Similarly, three lines u , u , and u intersect at the same p oint i.e., they are concurrent,
1 2 3
if the following equation holds:
det [ u u u ]= 0:
1 2 3
The concepts of homogeneous co ordinates are summarized in Figure 2. For further reading,
consult the notes by Guibas [3].
Example 1. Given two lines u =4; 2; 2 and u =6; 5; 1, the p ointofintersection is
1 2
given by:
i j k
4 2 2 =2 10i + 12 4j + 20 12k = 8; 8; 8 = 1; 1; 1:
6 5 1
Example 2. Consider the intersection of the hyp erb ola xy = 1 with the horizontal
line y =1.To convert these equations to homogeneous co ordinates, recall that X = Wx
2
and Y = Wy, yielding XY = W for the hyp erb ola and Y = W for the line. The
solution to these two equations is the p ointW;W;W, which is the same as the p oint
1; 1 in the Euclidean plane, the desired result. Now let us consider the intersection of
the same hyp erb ola with the horizontal line y =0,anintersection which do es not exist in
the Euclidean plane. In homogeneous co ordinates the line b ecomes Y = 0 which yields the
solution X; 0; 0, the ideal p oint asso ciated with the horizontal direction.
2.1.2 Ray space
2
Wehave just seen that, in going from Euclidean to pro jective, a p ointin R b ecomes a
3
set of p oints in R which are related to each other by means of a nonzero scaling factor. 4 point W u line p Y
X
Figure 3: Ray space.
2 2
Therefore, a p oint p =X; Y ; W in P can b e visualized as a \line" in three-dimensional
space passing through the origin and the p oint p Technically sp eaking, the line do es not
include the origin. This three-dimensional space is known as the ray space among other
2
names and is shown in Figure 3. Similarly, a line u =a; b; cin P can b e visualized as a
\plane" passing through the origin and p erp endicular to u. The ideal line is the horizontal
W = 0 \plane", and the ideal p oints are \lines" in this \plane."
2
Because the co ordinates are una ected by scalar multiplication, P is two-dimensional, even
though its p oints contain three co ordinates. In fact, it is top ologically equivalent to a sphere.
Each p oint p =X; Y ; W , represented as a \line" in ray space, can b e pro jected onto the
1
p
unit sphere to obtain the p oint X; Y ; W Notice that the denominator is never
2 2 2
X +Y +W
zero, since the p oint0; 0; 0 is not allowed. Thus, p oints in the pro jective plane can b e
visualized as p oints on the unit sphere, as shown in gure 4 Since each \line" in ray space
pierces the sphere twice, b oth these intersections represent the same p oint; that is, antip o dal
p oints are identi ed. Similarly, the \planes" that represent lines in ray space intersect the
unit sphere along great circles, so lines are visualized as great circles p erp endicular to u.
The ideal line is the great circle around the horizontal midsection of the sphere, and the
ideal p oints lie on this circle.
2.1.4 Augmented ane plane
2
To complete our geometrical tour of P , let us pro ject the unit sphere onto the plane W =1.
Y X
; ; 1 which lies at Each p ointX; Y ; W on the sphere is thus mapp ed to the p oint
W W
the intersection of the W = 1 plane with the \line" representing the p oint. Similarly, lines
are mapp ed to the intersection of the W = 1 plane with the \plane" representing the line.
Ideal p oints and the ideal line are pro jected, resp ectively, to p oints at in nity and the line
2
Since it can b ecome confusing to read statements such as, \A p oint is represented as a `line,' " we will
always enclose in quotation marks the entities whose sole purp ose is visualizati on in n + 1 dimensions. 5 point line p u ideal ideal
point line Figure 4: The unit sphere.
point line
ideal point ideal line W Y
u X
Figure 5: The ane plane plus the ideal line and ideal p oints.
at in nity, as shown in gure 5. Thus wehave returned to a representation in which p oints
are p oints and lines are lines. A concise de nition of the pro jective plane can now b e given:
2
De nition 1 The projective plane, P , is the ane plane augmented by a single ideal line
and a set of ideal points, one for each direction, where the ideal line and ideal points are
not distinguishable from regular lines and points.
The ane plane contains the same p oints as the Euclidean plane. The only di erence is
that the former also allows for nonuniform scaling and shear.
2.2 Duality
Lo oking once again at gure 2, the similarities b etween p oints and lines are striking. Their
representations, for example, are identical, and the formula for the intersection of two lines
is the same as the formula for the connecting line b etween two p oints. These observations
are not the result of coincidence but are rather a result of the duality that exists b etween
p oints and lines in the pro jective plane. In other words, any theorem or statement that is
true for the pro jective plane can b e reworded by substituting p oints for lines and lines for
p oints, and the resulting statement will b e true as well. 6
2.3 Pencil of lines
2
A set of concurrent lines in P , that is, a set of lines passing through the same p oint, is a
one-dimensional pro jective space called a pencil of lines. That the space is one-dimensional
is the obvious result of applying the principle of duality: a set of concurrent lines is the
same as a set of collinear p oints. We will say no more ab out a p encil of lines other than to
mention that it exists and that it has several applications in computer vision.
2.4 The cross ratio
As mentioned b efore, pro jective geometry preserves neither distances nor ratios of distances.
However, the cross ratio, which is a ratio of ratios of distances, is preserved and is therefore
2
a useful concept. Given four collinear p oints p , p , p , and p in P , denote the Euclidean
1 2 3 4
distance b etween two p oints p and p as . Then, one de nition of the cross ratio is the
i j ij
following:
13 24
Crp ; p ; p ; p = : 2
1 2 3 4
14 23
In other words, select one of the p oints, say p , to b e a reference p oint. Compute the ratio
1
of distances from that p ointtotwo other p oints, say p and p . Then compute the ratio of
3 4
distances from the remaining p oint, in this case p , to the same two p oints. The ratio of
2
these ratios is invariant under pro jective transformations.
T T
The Euclidean distance b etween two p oints p =[X ;Y ;W ] and p =[X ;Y ;W ] is
i i i i j j j j
computed from the 2D Euclidean p oints obtained by dividing by the third co ordinate, as
mentioned in section 2.1.1:
v
! !
u
2 2
u
Y X Y X
i j j i
t