Page 58 -
P. 58

2.1 Geometric primitives and transformations                                            37


               Scaled rotation.  The 3D similarity transform can be expressed as x = sRx + t where

               s is an arbitrary scale factor. It can also be written as


                                            x =    sR  t   ¯ x.                     (2.26)
               This transformation preserves angles between lines and planes.



               Affine.   The affine transform is written as x = A¯x, where A is an arbitrary 3 × 4 matrix,
               i.e.,
                                           ⎡                   ⎤
                                             a 00  a 01  a 02  a 03

                                      x =  ⎣  a 10  a 11  a 12  a 13  ⎦  ¯ x.       (2.27)
                                             a 20  a 21  a 22  a 23
               Parallel lines and planes remain parallel under affine transformations.

               Projective. This transformation, variously known as a 3D perspective transform, homog-
               raphy,or collineation, operates on homogeneous coordinates,
                                                     ˜

                                                ˜ x = H ˜x,                         (2.28)
                     ˜
               where H is an arbitrary 4 × 4 homogeneous matrix. As in 2D, the resulting homogeneous
               coordinate ˜x must be normalized in order to obtain an inhomogeneous result x. Perspective

               transformations preserve straight lines (i.e., they remain straight after the transformation).

               2.1.4 3D rotations

               The biggest difference between 2D and 3D coordinate transformations is that the parameter-
               ization of the 3D rotation matrix R is not as straightforward but several possibilities exist.

               Euler angles
               A rotation matrix can be formed as the product of three rotations around three cardinal axes,
               e.g., x, y, and z,or x, y, and x. This is generally a bad idea, as the result depends on the
               order in which the transforms are applied. What is worse, it is not always possible to move
               smoothly in the parameter space, i.e., sometimes one or more of the Euler angles change
                                                            1
               dramatically in response to a small change in rotation. For these reasons, we do not even
               give the formula for Euler angles in this book—interested readers can look in other textbooks
               or technical reports (Faugeras 1993; Diebel 2006). Note that, in some applications, if the
               rotations are known to be a set of uni-axial transforms, they can always be represented using
               an explicit set of rigid transformations.


               Axis/angle (exponential twist)
               A rotation can be represented by a rotation axis ˆn and an angle θ, or equivalently by a 3D
               vector ω = θˆn. Figure 2.5 shows how we can compute the equivalent rotation. First, we
               project the vector v onto the axis ˆn to obtain
                                                           T
                                         v   = ˆn(ˆn · v)=(ˆnˆn )v,                 (2.29)
                  1  In robotics, this is sometimes referred to as gimbal lock.
   53   54   55   56   57   58   59   60   61   62   63