MIL_ID SrcImageBufId, | //in |
MIL_ID DstImageBufId, | //in |
MIL_INT64 ProcMode | //in |
This function labels all objects (or blobs) in the specified source image, starting from the top-left corner, with unique consecutive values beginning with the value 1. Each pixel in the same blob is given the same numerical value.
If you want to distinguish between touching blobs, you should separate the blobs. For example, you can use an erosion operation before performing the labeling operation.
Specifies identifier of the data source of the operation. This parameter must be given an image buffer identifier. If the source buffer is not binary, all non-zero pixels are considered as part of an object or blob.
This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.
Specifies the identifier of the destination of the results. This parameter must be given an image buffer identifier. The destination buffer should be large enough to hold the maximum number of objects (blobs). For example, an 8-bit buffer can be used for a maximum of 254 blobs and a 16-bit buffer can be used for a maximum of 65534 blobs). If the destination buffer depth is too small, several blobs might be given the same value.
This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.
Specifies the type of connectivity (lattice) to use for processing. This parameter can be set to one of the following values:
For specifying the type of connectivity
to use
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_4_CONNECTED + |
Specifies that each pixel has 4 neighbors. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_8_CONNECTED + |
Specifies that each pixel has 8 neighbors. (more details...) |
You can add one of the following values to the above-mentioned values to specify the processing mode.
For the ProcMode parameter
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
||||||||||||||||||||||||||||||||||||||
M_BINARY |
Specifies the binary processing mode. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_GRAYSCALE |
Specifies the grayscale processing mode. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milim.lib. |
DLL | Requires mil.dll; milim.dll. |