mindspore.dataset.vision.AdjustHue

class mindspore.dataset.vision.AdjustHue(hue_factor)[source]

Adjust the hue of the input image.

Parameters

hue_factor (float) – How much to add to the hue channel, must be in range of [-0.5, 0.5].

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

  • ValueError – If hue_factor is not in the interval [-0.5, 0.5].

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

Supported Platforms:

CPU

Examples

>>> import mindspore.dataset as ds
>>> import mindspore.dataset.vision as vision
>>>
>>> image_folder_dataset = ds.ImageFolderDataset("/path/to/image_folder_dataset_directory")
>>> transforms_list = [vision.Decode(), vision.AdjustHue(hue_factor=0.2)]
>>> image_folder_dataset = image_folder_dataset.map(operations=transforms_list,
...                                                 input_columns=["image"])
Tutorial Examples: