machinevisiontoolbox.ImageSpatial.Kernel.DoG
- classmethod Kernel.DoG(sigma1, sigma2=None, h=None)[source]
Difference of Gaussians kernel
- Parameters:
sigma1 (float) – standard deviation of first Gaussian kernel
sigma2 (float, optional) – standard deviation of second Gaussian kernel
h (int, optional) – half-width of Gaussian kernel
- Returns:
2h+1 x 2h+1 kernel
- Return type:
Return the 2-dimensional difference of Gaussian kernel defined by two standard deviation values:
\[\mathbf{K} = G(\sigma_1) - G(\sigma_2)\]where \(\sigma_1 > \sigma_2\). By default, \(\sigma_2 = 1.6 \sigma_1\).
The kernel is centred within a square array with side length given by:
\(2 \mbox{ceil}(3 \sigma) + 1\), or
\(2\mathtt{h} + 1\)
Example:
TypeError: unsupported operand type(s) for -: 'Kernel' and 'Kernel'