7.3.12. Morphological Operations
(lsh/libimage/morpho.lsh)

Author(s): Leon Bottou 09/96

Erosion, dilation, distance transforms, thresholding, and masking on on images of ubytes.

7.3.12.0. (ubim-internal-disttrans im dist)
(lsh/libimage/morpho.lsh)


Returns the internal distance transformation matrix of binary image im . The elements of the output ubyte matrix dist contains the distance to the closest background pixel in the image (background level is zero for this purpose). Distances are clipped to 255. The dimensions of dist must be 2 larger than that of im . dist will be resized to the appropriate size if necessary.

7.3.12.1. (ubim-external-disttrans im dist)
(lsh/libimage/morpho.lsh)


computes the external distance transformation matrix of binary image im . The elements of the output ubyte matrix dist contains the distance to the closest non-background pixel in the image (background level is zero for this purpose). Distances are clipped to 255. The dimensions of dist must be 2 larger than that of im . dist will be resized to the appropriate size if necessary.

7.3.12.2. (ubim-positive-threshold im thres)
(lsh/libimage/morpho.lsh)


Applies a threshold on ubyte image im . All values smaller than or equal to threshold are zeroed. Other values are set to 255.

7.3.12.3. (ubim-negative-threshold im thres)
(lsh/libimage/morpho.lsh)


Applies a threshold on ubyte image im . All values smaller than or equal to threshold are set to 255. Other values are set to 0

7.3.12.4. (ubim-erosion im factor)
(lsh/libimage/morpho.lsh)


Perform in place erosion of ubyte image im at distance factor .

7.3.12.5. (ubim-dilation im factor)
(lsh/libimage/morpho.lsh)


Perform in place dilation of ubyte image im at distance factor .

7.3.12.6. (ubim-mask im mask)
(lsh/libimage/morpho.lsh)


Sets to zero all bytes of ubyte image im whose corresponding pixel in mask is zero. This is a AND operation.