MATLAB File Help: cv.getGaussianKernel Index
cv.getGaussianKernel

Returns Gaussian filter coefficients

kernel = cv.getGaussianKernel()
kernel = cv.getGaussianKernel('OptionName', optionValue, ...)

Output

Options

The function computes and returns the KSize x 1 matrix of Gaussian filter coefficients:

 G_i = alpha * exp( -(i - (KSize-1)/2)^2 / (2*sigma^2) )

where i = 0, ..., KSize-1 and alpha is the scale factor chosen so that \sum_i G_i = 1.

Two of such generated kernels can be passed to cv.sepFilter2D. Those functions automatically recognize smoothing kernels (a symmetrical kernel with sum of weights equal to 1) and handle them accordingly. You may also use the higher-level cv.GaussianBlur

See also