Kernel.print#
- Kernel.print(fmt: str | None = None, separator: str = ' ', precision: int = 2) None[source]#
Print kernel weights in compact format
- Parameters:
fmt (str, optional) – format string, defaults to None
separator (str, optional) – value separator, defaults to single space
precision (int, optional) – precision for floating point kernel values, defaults to 2
Very compact display of kernel numerical values in grid layout.
Example:
>>> from machinevisiontoolbox import Kernel >>> K = Kernel.Gauss(sigma=2) >>> K.print() 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.01 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.01 0.01 0.01 0.01 0.01 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.01 0.01 0.02 0.02 0.02 0.01 0.01 0.00 0.00 0.00 0.00 0.00 0.00 0.01 0.02 0.03 0.04 0.03 0.02 0.01 0.00 0.00 0.00 0.00 0.00 0.01 0.01 0.02 0.04 0.04 0.04 0.02 0.01 0.01 0.00 0.00 0.00 0.00 0.00 0.01 0.02 0.03 0.04 0.03 0.02 0.01 0.00 0.00 0.00 0.00 0.00 0.00 0.01 0.01 0.02 0.02 0.02 0.01 0.01 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.01 0.01 0.01 0.01 0.01 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.01 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00