Syntax: label(image, region color, connectivity)

Labels distinct regions in the image with individual colors. The regions do not need to be separated by background. Execution is terminated in an error if the pixel data type does not support large enough values to label all the particles.

This command cannot be used in the distributed processing mode. If you need it, please contact the authors.


image [input & output]

Data type: uint8 image, uint16 image, uint32 image, uint64 image, int8 image, int16 image, int32 image, int64 image, float32 image

Image to process.

region color [input]

Data type: real

Default value: 0

Current color of regions that should be labeled. Set to zero to label all non-zero regions.

connectivity [input]

Data type: connectivity

Default value: Nearest

Connectivity of the particles. Can be Nearest for connectivity to nearest neighbours only, or All for connectivity to all neighbours.