mindspore.dataset.vision.c_transforms.RandomSolarize

class mindspore.dataset.vision.c_transforms.RandomSolarize(threshold=(0, 255))[source]

Randomly invert the pixel values of input image within given range.

Parameters

threshold (tuple, optional) – Range of random solarize threshold (default=(0, 255)). Threshold values should always be in (min, max) format, where min <= max, min and max are integers in the range (0, 255). If min=max, then invert all pixel values above min(max).

Examples

>>> transforms_list = [c_vision.Decode(), c_vision.RandomSolarize(threshold=(10,100))]
>>> image_folder_dataset = image_folder_dataset.map(operations=transforms_list,
...                                                 input_columns=["image"])