mindspore.dataset.vision.c_transforms.RandomSolarize
- class mindspore.dataset.vision.c_transforms.RandomSolarize(threshold=(0, 255))[source]
Invert all pixel values above a threshold.
- Parameters
threshold (tuple, optional) – Range of random solarize threshold. Threshold values should always be in the range (0, 255), include at least one integer value in the given range and be in (min, max) format. If min=max, then it is a single fixed magnitude operation (default=(0, 255)).
Examples
>>> import mindspore.dataset.vision.c_transforms as c_vision >>> >>> transforms_list = [c_vision.Decode(), c_vision.RandomSolarize(threshold=(10,100))] >>> data1 = data1.map(operations=transforms_list, input_columns=["image"])