Image Processing Reference
In-Depth Information
Fig. 11.14 A local geometric transformation based on rotation
11.2.5 Local Transformation
In the four geometric transformations above, all pixels go through the same mapping
process and we can therefore refer to such transformations as global. This need
not be the case and we can apply different transformations locally, hence a local
transformation . Obviously this can result in many different outputs by combining
the four transformations above plus those presented in Chap. 10. Here we provide
an example based on rotation.
First we copy the input image to the output image in order to avoid empty pixels
in the output. Next we divide the input image into a number of squares each having
the size S
×
S . Each square in the input is now rotated and mapped to the output im-
age. The rotation angle is either θ degrees or
θ degrees, depending on its position
in the input. That is, the first square is rotated θ degrees. The second
θ degrees.
The third θ degrees and so on. The actual rotation is done using backward mapping.
TheeffectisshowninFig. 11.14 for two different parameter settings.
11.3 Further Information
An alternative approach to perform a local geometric transformation is to use warp-
ing . If we recall the analogy to magic mirrors, warping corresponds to the glass of
the mirror being shaped differently depending on its position on the mirror. Com-
pared to the local approach described above, warping ensures that we do not have
abrupt changes in the output as seen in Fig. 11.14 (b). In warping, the input image is
divided into a number of triangles, which are then each mapped by an affine trans-
formation, see Sect. 10.1, to the output image, see Fig. 11.15 .
Another use of warping is found in morphing . Morphing is the process of map-
ping one image into another image. This is seen in for example TV commercials
where a wild animal is mapped into a beautiful woman. Morphing is based on know-
ing where a number of keypoints in one image should end up in the other image,
for example the position of eyes, ears and mouth. These points are used to calculate
Search WWH ::




Custom Search