{% extends "base.html" %} {% block title %} getGaussianKernel {% endblock %} {% block description %}

Computes and returns the ksize x 1 matrix of Gaussian filter coefficients.

{% endblock %} {% block signature %}
cv2.getGaussianKernel(ksize, sigma[, ktype]) → retval
{% endblock %} {% block parameters %} {% endblock %} {% block notes %} {% endblock %} {% block explanation %}

This function computes and returns the ksize x 1 matrix of Gaussian filter coefficients:

\[G_i\ =\ \alpha\ *\ e^\frac{-\left(i-(ksize-1))/2\right)^2}{2*{\rm sigma}^2}\]

Where \(i= 0…ksize-1\) and \(\alpha\) is the scaling factor so that \(\sum_{i} G_i=1 \).

{% endblock %} {% block references %} {% endblock %}