Grayscale

class CVAugmentor.assets.augmentations._grayscale.Grayscale

Convert an image to grayscale. The image remains in RGB format for consistency with other methods.

Usage

The class instance must be called.

__init__() None

Constructor of the Grayscale class.

Parameters:

None.

Return type:

None.

_grayscale(image: Image) Image

The grayscale conversion operation.

Parameters:

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

Returns:

grayscaled_image – The grayscaled image in RGB format.

Return type:

Image.Image