mindspore.dataset.vision.c_transforms.GaussianBlur

class mindspore.dataset.vision.c_transforms.GaussianBlur(kernel_size, sigma=None)[source]

Blur input image with the specified Gaussian kernel.

Parameters
  • kernel_size (Union[int, sequence]) – Size of the Gaussian kernel to use. The value must be positive and odd. If only an integer is provied, the kernel size will be (size, size). If a sequence of integer is provied, it must be a sequence of 2 values which represents (width, height).

  • sigma (Union[float, sequence], optional) – Standard deviation of the Gaussian kernel to use (default=None). The value must be positive. If only an float is provied, the sigma will be (sigma, sigma). If a sequence of float is provied, it must be a sequence of 2 values which represents the sigma of width and height. If None is provided, the sigma will be calculated as ((kernel_size - 1) * 0.5 - 1) * 0.3 + 0.8.

Examples

>>> transforms_list = [c_vision.Decode(), c_vision.GaussianBlur(3, 3)]
>>> image_folder_dataset = image_folder_dataset.map(operations=transforms_list,
...                                                 input_columns=["image"])