mindspore.dataset.vision.RandomColor

class mindspore.dataset.vision.RandomColor(degrees=(0.1, 1.9))[source]

Adjust the color of the input image by a fixed or random degree. This operation works only with 3-channel color images.

Parameters

degrees (Sequence[float], optional) – Range of random color adjustment degrees, which must be non-negative. It should be in (min, max) format. If min=max, then it is a single fixed magnitude operation. Default: (0.1, 1.9).

Raises
Supported Platforms:

CPU

Examples

>>> transforms_list = [vision.Decode(), vision.RandomColor((0.5, 2.0))]
>>> image_folder_dataset = image_folder_dataset.map(operations=transforms_list,
...                                                 input_columns=["image"])