One way to define the rotation matrix in three dimensions is by composing rotations about the three principal axes of the reference frame.
Let us define as the pitch angle,
as the yaw angle, and
as the roll angle, which are the orientation angles of the sensor with respect to the world reference frameA.3 These angles and this nomenclature are referred to as Tait-Bryan Angles, Cardan Angles (after Gerolamo Cardano), or nautical angles.
Below, the matrices will be presented (as referenced in example (LaV06)) that convert a vector from sensor coordinates to world coordinates through angles that represent the orientation of the sensor with respect to the world itself. These are the same matrices that rotate a vector in a counterclockwise direction with respect to the various axes of the reference system.
The axes of this reference system are those shown in figure 8.4. However, it should be noted that for terrestrial vehicles and ships, a reference system different from the aeronautical one is preferred.
The rotation matrix for the roll angle (around the X axis) is given by:
The rotation matrix for the pitch angle (around the Y axis) is given by:
The rotation matrix for the yaw angle (around the Z axis) is given by:
As stated in the previous section, the composition of rotations is not commutative, and it is necessary to make a choice.
In the aeronautical field, 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 performing the multiplications,
It should be noted that this matrix transforms points from the moving coordinates "sensor" (body coordinates in the generic case) to the fixed coordinates "world".
In the specific case where 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" coordinates Front-Left-Up to "camera" coordinates can be expressed as a product of
It should be emphasized that the matrix
, expressed as in formula (A.9), is the matrix that "removes" the rotation of a sensor at those specific positioning angles and thus transforms from "world" coordinates to "camera" coordinates. In contrast, it is common in the literature to refer to the rotation matrix as the one that converts from "sensor" coordinates to "world" coordinates.
It is interesting to note that from a purely graphical perspective, the columns of the inverse/transposed matrix of matrix (A.10), which allows for the transformation of points from camera coordinates to world coordinates, facilitate the easy drawing of the axes and thus graphically represent the orientation of the camera.