machinevisiontoolbox.ImageSpatial.Kernel.Box
- classmethod Kernel.Box(h, normalize=True)[source]
Square structuring element
- Parameters:
h (int) – half-width of kernel
normalize (bool, optional) – normalize volume of kernel to one, defaults to True
- Returns:
2h+1 x 2h+1 kernel
- Return type:
Returns a square kernel with unit volume.
The kernel is centred within a square array with side length given by \(2\mathtt{h} + 1\).
Example:
>>> from machinevisiontoolbox import Kernel >>> Kernel.Box(2) <machinevisiontoolbox.ImageSpatial.Kernel object at 0x7fdaddf952b0> >>> Kernel.Box(2, normalize=False) <machinevisiontoolbox.ImageSpatial.Kernel object at 0x7fdaddfdca30>
- References:
Robotics, Vision & Control for Python, Section 11.5.1.1, P. Corke, Springer 2023.
- Seealso: