[mmHistogram] [Up] [mmBlob] Measurements

mmLabel
Label a binary image.

Synopsis

Image mmLabel ( const Image& f , const Strel& Bc = NullStrel );

Input

f Image [ Binary image ]

Bc Structuring Element

( connectivity).

Default: NullStrel (3x3 elementary cross)

Output

y Image

If number of labels is less than 65535, the data type is uint16, otherwise it is int32.

Description

mmLabel creates the image y by labeling the connect components of a binary image f, according to the connectivity defined by the structuring element Bc. The background pixels (with value 0) are not labeled. The maximum label value in the output image gives the number of its connected components.

This implementation is very fast and is based on the algorithm proposed in [SB98].

Equation

Where H is the number of image rows, and y1 and y2 are the row and column coordinates respectively.

See also

mmLabelflat Label the flat zones of gray-scale images.
mmSebox Create a box structuring element.
mmSecross Diamond structuring element and elementary 3x3 cross.
mmAreaopen Area opening
mmBlob Blob measurements from a labeled image.
mmGrain Gray-scale statistics for each labeled region.
[mmHistogram] [Up] [mmBlob]