mindspore.dataset.vision.AdjustSharpness

View Source On Gitee
class mindspore.dataset.vision.AdjustSharpness(sharpness_factor)[source]

Adjust the sharpness of the input image.

Parameters

sharpness_factor (float) – How much to adjust the sharpness, must be non negative. 0 gives a blurred image, 1 gives the original image while 2 increases the sharpness by a factor of 2.

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

  • ValueError – If sharpness_factor is less than 0.

  • RuntimeError – If shape of the input image is not <H, W> or <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.AdjustSharpness(sharpness_factor=2.0)]
>>> image_folder_dataset = image_folder_dataset.map(operations=transforms_list,
...                                                 input_columns=["image"])
Tutorial Examples: