
140 A Computational Introduction to Digital Image Processing, Second Edition
Now we can rotate an image by considering it as a large collection of points. Figure 6.19
illustrates the idea. In this figure, the dark circles indicate the original position; the light
FIGURE 6.19: Rotating a rectangle
points their positions after rotation. However, this approach won’t work for images. Since
an image grid can be considered as pixels forming a subset of the Cartesian (integer valued)
grid, we must ensure that even after rotation, the points remain in that grid. To do this we
consider a rectangle that includes the rotated image, as shown in Figure 6.20. Now ...