Page 55 -
P. 55

34                                                                        2 Image formation


                                Scaled rotation.  Also known as the similarity transform, this transformation can be ex-

                                pressed as x = sRx + t where s is an arbitrary scale factor. It can also be written as

                                                                        a
                                                                           −bt x
                                                    x =   sR   t  ¯ x =            ¯ x,              (2.18)

                                                                        b  a   t y
                                                            2
                                                                2
                                where we no longer require that a + b =1. The similarity transform preserves angles
                                between lines.
                                Affine.  The affine transformation is written as x = A¯x, where A is an arbitrary 2 × 3

                                matrix, i.e.,

                                                                a 00  a 01  a 02

                                                         x =                  ¯ x.                   (2.19)
                                                                a 10  a 11  a 12
                                Parallel lines remain parallel under affine transformations.
                                Projective.  This transformation, also known as a perspective transform or homography,
                                operates on homogeneous coordinates,
                                                                     ˜

                                                                ˜ x = H ˜x,                          (2.20)
                                      ˜
                                                                        ˜
                                where H is an arbitrary 3 × 3 matrix. Note that H is homogeneous, i.e., it is only defined
                                                      ˜
                                up to a scale, and that two H matrices that differ only by scale are equivalent. The resulting

                                homogeneous coordinate ˜x must be normalized in order to obtain an inhomogeneous result
                                x, i.e.,
                                                  h 00 x + h 01 y + h 02   h 10 x + h 11 y + h 12
                                             x =                   and y =                 .         (2.21)


                                                  h 20 x + h 21 y + h 22   h 20 x + h 21 y + h 22
                                Perspective transformations preserve straight lines (i.e., they remain straight after the trans-
                                formation).
                                Hierarchy of 2D transformations. The preceding set of transformations are illustrated
                                in Figure 2.4 and summarized in Table 2.1. The easiest way to think of them is as a set
                                of (potentially restricted) 3 × 3 matrices operating on 2D homogeneous coordinate vectors.
                                Hartley and Zisserman (2004) contains a more detailed description of the hierarchy of 2D
                                planar transformations.
                                   The above transformations form a nested set of groups, i.e., they are closed under com-
                                position and have an inverse that is a member of the same group. (This will be important
                                later when applying these transformations to images in Section 3.6.) Each (simpler) group is
                                a subset of the more complex group below it.


                                Co-vectors. While the above transformations can be used to transform points in a 2D
                                plane, can they also be used directly to transform a line equation? Consider the homogeneous
                                       ˜                         ˜
                                equation l · ˜x =0. If we transform x = Hx, we obtain

                                                   ˜       ˜ ˜      ˜ ˜ T     ˜                      (2.22)
                                                            T
                                                                      T
                                                   l · ˜x = l H ˜x =(H l ) ˜x = l · ˜x =0,
                                   ˜    ˜  −T ˜
                                i.e., l = H  l. Thus, the action of a projective transformation on a co-vector such as a 2D
                                line or 3D normal can be represented by the transposed inverse of the matrix, which is equiv-
                                                   ˜
                                alent to the adjoint of H, since projective transformation matrices are homogeneous. Jim
   50   51   52   53   54   55   56   57   58   59   60