cv3.transform.dflip

cv3.transform.dflip(img)[source]

Flip image diagonally (around both axes).

Parameters:

img (numpy.ndarray) – Input image.

Returns:

Diagonally 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 diagonally
>>> flipped = cv3.dflip(img)