opencv::gapi

Function gaussian_blur

source
pub fn gaussian_blur(
    src: &impl GMatTraitConst,
    ksize: Size,
    sigma_x: f64,
    sigma_y: f64,
    border_type: i32,
    border_value: Scalar,
) -> Result<GMat>
Expand description

Blurs an image using a Gaussian filter.

The function filter2Ds the source image with the specified Gaussian kernel. Output image must have the same type and number of channels an input image.

Supported input matrix data types are [CV_8UC1], [CV_8UC3], [CV_16UC1], [CV_16SC1], [CV_32FC1]. Output image must have the same type, size, and number of channels as the input image.

Note:

  • Rounding to nearest even is procedeed if hardware supports it, if not - to nearest.
  • Function textual ID is “org.opencv.imgproc.filters.gaussianBlur”

§Parameters

  • src: input image;
  • ksize: Gaussian kernel size. ksize.width and ksize.height can differ but they both must be positive and odd. Or, they can be zero’s and then they are computed from sigma.
  • sigmaX: Gaussian kernel standard deviation in X direction.
  • sigmaY: Gaussian kernel standard deviation in Y direction; if sigmaY is zero, it is set to be equal to sigmaX, if both sigmas are zeros, they are computed from ksize.width and ksize.height, respectively (see cv::getGaussianKernel for details); to fully control the result regardless of possible future modifications of all this semantics, it is recommended to specify all of ksize, sigmaX, and sigmaY.
  • borderType: pixel extrapolation method, see cv::BorderTypes
  • borderValue: border value in case of constant border type

§See also

sepFilter, boxFilter, medianBlur

§C++ default parameters

  • sigma_y: 0
  • border_type: BORDER_DEFAULT
  • border_value: Scalar(0)