1.1. Projective Geometry¶
The straightforward way to model geometry in 3D space is with the 3 dimensional Euclidean vector space \(\setR^3\). For geometry on the plane (drawings and images) the equivalent choice is \(\setR^2\). A Euclidean vector space implies the existence of the Euclidean vector norm. A vector norm is what is needed to define lengths and angles.
When dealing with 2D images being the projections of the 3D world, Euclidean geometry does not suffice anymore as a mathematical model. To obtain a feeling for the necessity of projective geometry, we take a quick look at the basic imaging device: the pinhole camera, before we introduce the math of projective geometry.
Imagine standing in a darkened room with only a small hole in one of the walls (see Fig. 1.20) and a semi transparent screen a short distance from the hole. The 3D outside world is projected onto the screen. Such a room (or device as you can build miniature versions) is called a camera obscura.
From the image of the road with trees in Fig. 1.21 we can observe that in the projected space:
- points on a line in the real world are projected as points on a line on the retina,
- lines which are parallel in 3D space are projected on lines that meet at the horizon,
- lengths are not preserved (a tree far away is projected much smaller then a nearby tree) and
- angles are not preserved.
Note that not all parallel lines in 3D will meet in a point in the projection. Two lines parallel to the horizon will not meet in a point. I.e. not in a point nearby, but mathematically we say that the lines meet in a point at infinity. Euclidean geometry is not capable of dealing with points (and lines) at infinity. In projective geometry the points at infinity are treated as all other points in space.
The most important invariance in projective space (indeed its defining property) is that colinearity is preserved. Points on a line will stay points on a line (although maybe a different line).
1.1.1. Projective Geometry in 2D¶
For projective geometry in 2D we use homogeneous coordinates. For an introduction to homogeneous coordinates we refer to section Homogeneous Coordinates.
By definition a projective transform preserves colinearity of points. It can be shown that any 2D projective transform is a linear operator in homogeneous 3D space (i.e. using vectors in 3D space). And therefore any 2D projective transform \(P\) can be represented with a \(3\times3\) matrix working on the homogeneous 3D vectors. Also any \(3\times3\) matrix represents a projective 2D transform.
In this chapter on the pinhole camera we will write homogeneous vectors with a tilde: \(\hv x\). So for a 2D point:
the corresponding homogeneous vectors are all of the form:
for any \(s\not=0\). So two homogeneous vectors \(\hv x\) and \(\hv y\) such that \(\hv x\not=\hv y\) can still correspond with the same 2D point (in case \(\hv y\) is a multiple of \(\hv x\)). Such homogeneous vectors that are not mathematically the same, but do have the same interpretation are said to be similar and denoted as:
1.1.2. Projective Geometry in 3D¶
For projective geometry in 3D space we need to use homogeneous vectors in 4D. Projective transforms in 3D space are then represented as \(4\times4\) matrices.
In 2D space lines can be represented with a homogeneous vector like points in 2D space. In 3D space a point is represented with a 4D homogeneous vector and we can also represent planes with a 4D homogeneous vector.