Example: Flipping Images
Use the horzflip and vertflip functions to flip an image around a horizontal or a vertical center line.
For information on using this example, refer to
About Image Processing Examples.
horzflip
This function returns the original image, or matrix, flipped from left to right.
1. Read in an image and apply the horzflip function to it.
(pattern.bmp) | (pattern_hflip.bmp) |
2. Define a matrix and apply the horzflip function to it:
3. Applying horzflip to a horizontally flipped matrix returns the original matrix.
vertflip
This function returns the original image, or matrix, flipped upside down.
1. Read in an image and apply the vertflip function to it:
(pattern.bmp) | (pattern_vflip.bmp) |
2. Apply the vertflip function to matrix M:
3. Applying vertflip to a vertically flipped matrix returns the original matrix.