Kernel#
- class Kernel(K: ndarray, name: str | None = None)[source]#
Convolution kernel object
- Parameters:
K (ndarray(N,M)) – kernel weighting matrix
name (str, optional) – name of the kernel, defaults to None
- Raises:
ValueError –
Kis not a 2D ndarray
Kernel objects are used to represent convolution kernels for image processing operations. They are created by a number of class methods that generate common kernels such as Gaussian, Laplacian, etc.
ImageCore.Imagemachinevisiontoolbox.ImageCore.Imagemachinevisiontoolbox.Image- Seealso:
GaussLaplaceSobelDoGLoGDGaussCircleBox
Methods
Box(h[, normalize])Square structuring element
Circle(radius[, h, normalize, dtype])Circular structuring element
DGauss(sigma[, h])Derivative of Gaussian kernel
disp3d([block])Show kernel as a 3D surface plot
DoG(sigma1[, sigma2, h])Difference of Gaussians kernel
Gauss(sigma[, h])Gaussian kernel
HGauss(sigma[, h])Hessian of Gaussian kernel
Laplace()Laplacian kernel
LoG(sigma[, h])Laplacian of Gaussian kernel
print([fmt, separator, precision])Print kernel weights in compact format
Sobel()Sobel edge detector
Properties
shapeT