One way to define the rotation matrix in three dimensions is to compose rotations about the three principal axes of the reference frame.
Let denote the pitch angle pitch,
the yaw angle yaw, and
the roll angle roll, namely, sensor-orientation angles with respect to the world reference frameA.3
These angles and this nomenclature are defined as Tait-Bryan Angles, Cardan Angles (after Girolamo Cardano), or nautical angles.
The following presents the matrices (for reference, for example (LaV06)) that convert a vector from sensor coordinates to world coordinates through angles representing the orientation of the sensor with respect to the world frame itself; these are the same matrices that rotate a vector counterclockwise (counterclockwise rotation of axes) about the various axes of the reference frame.
The axes of this reference frame are those shown in figure 9.4. Care must nevertheless be taken because land vehicles and ships generally use a reference frame different from the aeronautical one.
The rotation matrix for the roll angle (axis X):
The rotation matrix for the pitch angle (axis Y):
The rotation matrix for the yaw angle (axis Z):
As stated in the previous section, the composition of rotations is not commutative, and a choice must be made.
In aeronautics, the Roll-Pitch-Yaw (RPY) convention is suggested.
Under this particular convention, the change-of-basis matrix (alias) is constructed as
A.4 that is, by carrying out the multiplications,
In the specific case in which the sensor is a pin-hole camera, using this convention and considering equation (A.5), the rotation matrix
of the pin-hole camera that converts from “world” Front-Left-Up coordinates to “camera” coordinates can be expressed as the product of
It should be emphasized that the matrix
, expressed as in formula (A.10), is the matrix that “removes” the rotation of a sensor having those particular positioning angles and therefore transforms from “world” coordinates to “camera” coordinates, whereas the matrix that converts from “sensor” coordinates to “world” coordinates is normally referred to as the rotation matrix in the literature.
It is interesting to note that, from a purely graphical point of view, the columns of the inverse/transpose of matrix (A.11), which allows points to be transformed from camera coordinates to world coordinates, make it easy to draw the axes and thus graphically represent the camera orientation.