Flip

class CVAugmentor.assets.augmentations._flip.Flip(flip_type: str = 'vertical')

Flip the image horizontally or vertically.

Usage

The class instance must be called.

__init__(flip_type: str = 'vertical') None

Constructor of the Flip class.

Parameters:

flip_type (str, optional) –

Type of flip. The default value is “vertical”.
The options are:
”horizontal”

Flip the image horizontally.

”vertical”

Flip the image vertically.

Return type:

None.

_flip(image: Image) Image

The flip operation.

Parameters:

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

Returns:

flipped_image – The flipped image.

Return type:

Image