MMACH commands


PROGRAM NAME

viff2str - converts VIFF file to a structuring element (MMACH)

DESCRIPTION

viff2str Converts an input Khoros image to a morphological kernel.

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.

REQUIRED ARGUMENTS

-i
type: infile
desc: input viff image file
-o
type: outfile
desc: output resulting struc file definition

OPTIONAL ARGUMENTS

-t
type: boolean
desc: kernel format
default: false

EXAMPLES

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.

SEE ALSO

vstrset(1), lviff2str(3)

RESTRICTIONS

REFERENCES

COPYRIGHT

Copyright (C) 1993-1997 Junior Barrera, Roberto Lotufo. All rights reserved.