The term Structuring element is more often used than morphological kernel.
For many applications, the ability to use a generic VIFF image as the Structuring Element in a morphological operation is required.
The Structuring Element generated may be of two kinds:
_ Planar: the zero pixels are interpreted as background, whereas non-zero pixels are the domain. This is the case, for example, of the Khoros morpho kernels.
_ Non-planar: Negative pixels represent the background, whereas non-negative pixels give the values. Pixel values should stay in the 0-255 range.
The default option is Planar.
The origin of the kernel will be placed at the center of the input image. In case of even dimensions, then the origin is shifted to the right. For example, in a 4x4 kernel: x x x x x x x x o -> the origin x x o x x x x x viff2str accepts as input any Khoros data type.
The kernel is stored in a special format file.
viff2str -i $KHOROS_HOME/data/morphokernel/diamond7.mor -o diamond7.str
Creates a planar (the default) structuring element for morphological functions from the standard 7x7 diamond Khoros kernel.