mindspore.dataset.vision.c_transforms.RandomSharpness
- class mindspore.dataset.vision.c_transforms.RandomSharpness(degrees=(0.1, 1.9))[source]
Adjust the sharpness of the input image by a fixed or random degree. Degree of 0.0 gives a blurred image, degree of 1.0 gives the original image, and degree of 2.0 gives a sharpened image.
- Parameters
degrees (tuple, optional) – Range of random sharpness adjustment degrees. It should be in (min, max) format. If min=max, then it is a single fixed magnitude operation (default = (0.1, 1.9)).
- Raises
TypeError – If degrees is not a list or tuple.
ValueError – If degrees is negative.
ValueError – If degrees is in (max, min) format instead of (min, max).
Examples
>>> import mindspore.dataset.vision.c_transforms as c_vision >>> >>> transforms_list = [c_vision.Decode(), c_vision.RandomSharpness(degrees=(0.2, 1.9))] >>> data1 = data1.map(operations=transforms_list, input_columns=["image"])