Rotate

class CVAugmentor.assets.augmentations._rotate.Rotate(angle: int | float = 90)

Rotate an image by a definite or random angle.

Usage

The class instance must be called.

__init__(angle: int | float = 90) None

Constructor of the Rotate class.

Parameters:

angle (int or float, optional) – Angle of rotation. The default value is 90.

Return type:

None.

_rotate(image: Image) Image

The rotation operation.

Parameters:

image (Image.Image) – The image to be augmented.

Returns:

rotated_image – The rotated image.

Return type:

Image.Image