cv3.transform.vflip
- cv3.transform.vflip(img)[source]
Flip image vertically (around x-axis).
- Parameters:
img (numpy.ndarray) – Input image.
- Returns:
Vertically flipped image.
- Return type:
numpy.ndarray
Example
>>> import cv3 >>> import numpy as np >>> # Create a simple image >>> img = np.zeros((100, 100, 3), dtype=np.uint8) >>> img[25:75, 25:75] = [255, 255, 255] # White square >>> # Flip vertically >>> flipped = cv3.vflip(img)