mindspore.dataset.vision.AdjustSaturation

class mindspore.dataset.vision.AdjustSaturation(saturation_factor)[source]

Adjust the saturation of the input image.

Parameters

saturation_factor (float) – How much to adjust the saturation, must be non negative. 0 gives a black image, 1 gives the original image while 2 increases the saturation by a factor of 2.

Raises
  • TypeError – If saturation_factor is not of type float.

  • ValueError – If saturation_factor is less than 0.

  • RuntimeError – If shape of the input image is not <H, W, C>.

  • RuntimeError – If channel of the input image is not 3.

Supported Platforms:

CPU

Examples

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