mindspore.dataset.vision.c_transforms.RandomSolarize

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

Randomly selects a subrange within the specified threshold range and sets the pixel value within the subrange to (255 - pixel).

Parameters

threshold (tuple, optional) – Range of random solarize threshold (default=(0, 255)). Threshold values should always be in (min, max) format, where min and max are integers in the range (0, 255), and min <= max. 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"])