Example: Rotating Images
Use the
rotate function to rotate an image counterclockwise through a specified angle.
For information on using this example, refer to
About Image Processing Examples.
1. Read in a sample image.
2. Apply the rotate function to the image.
(pattern.bmp) | (pattern_r35.bmp) |
For rotations that are not multiples of 90 degrees, the extra pixels are set to zero (black background).
3. To view the result of rotate mathematically, construct the following image matrix.
4. Apply the rotate function to M.