|
In practical applications, it is necessary to move from a coordinate system fixed to the camera, in which point
coincides with the projection center (pin-hole), to a more general coordinate system better suited to the user's needs, in which the camera is positioned at an arbitrary point in the “world” and oriented arbitrarily with respect to it.
This applies to any sensor, including non-imaging sensors, by defining relationships that allow points to be transformed from world coordinates to sensor coordinates and vice versa.
At this point, we need to clarify the terminology used in this book for coordinate systems: the “world” coordinate system is the system considered absolute and fixed in each context, relative to which the sensor is positioned. For example, in Figure 9.4, the origin of the “world” system is associated with a point on the vehicle (for example, its frontmost point). In this case, “vehicle” (body) and “world” are synonymous. This distinction no longer applies, however, when a vehicle moves relative to a “world,” which can again be defined as the fixed coordinate system. In this case, we have sensor coordinates, the vehicle's local or body coordinates, and world coordinates. Usually, however, the axes defining the sensor, vehicle, and world coordinate systems are kept consistent.
In camera coordinates, the special role of coordinate arises for purely mathematical reasons: using homogeneous coordinates requires dividing the first two components by the third during projection. This restriction does not apply to “sensor” coordinates.
Although there is no requirement to do so, this book uses the coordinate system shown in Figure 9.4 (ISO 8855) for “sensor,” “body,” and “world” coordinates, with axis
representing the point's height above the ground.
To derive the final pin-hole camera equation, we start with Equation (9.10) and apply the following considerations:
The transformation from “world” coordinates to “camera” coordinates is a composition of rotations and is therefore itself a rotation, given by
.
Let
be a point in “world” coordinates and
the same point in “camera” coordinates.
The relationship between these points can be written as
Recall that rotation matrices are orthonormal: their determinant is 1, so they preserve distances and areas, and the inverse of a rotation matrix is its transpose.
The matrix and the vector
can be combined into a matrix
using homogeneous coordinates.
This representation makes it possible to write the projection of a point, expressed in homogeneous world coordinates as
, onto an image point in homogeneous coordinates as
, very compactly:
This equation makes it clear that each image point corresponds to infinitely many world points
lying on a line as the parameter
varies.
Assuming and collecting the matrices yields the final pin-hole camera equation (which does not, and should not, account for distortion):
It is worth noting that imposing an additional constraint on the points, for example , reduces the matrix
to an invertible
matrix, which is exactly the homography (see Section 9.3.1) of the perspective transformation of points on the ground.
The matrix
is an example of an IPM (Inverse Perspective Mapping) transformation used to obtain a bird's-eye view of the scene (MBLB91).
The inverse of the relationship in Equation (9.24), which transforms image points into world coordinates, can be written as:
Using the Camera Matrix
directly gives a result equivalent to Equation (9.26) in the form