Synopsis
Draw a labeled image.
Format
void MblobLabel(BlobResId, DestImageBufId, Mode)
MIL_ID BlobResId; | Blob analysis result buffer identifier |
MIL_ID DestImageBufId; | Destination image buffer identifier |
long Mode; | Write mode |
Description
This function draws a labeled image in which each blob existing in the specified result buffer is represented with its own unique label value.
The label values are taken from the blob analysis result buffer. A call to MblobCalculate must have been made to generate label values for an image. Blobs that have been deleted from the result buffer are not drawn.
The BlobResId parameter specifies the identifier of the blob analysis result buffer.
The DestImageBufId parameter specifies the identifier of the destination (labeled) image buffer. This cannot be a binary buffer.
Note, the destination buffer must be at least the same size as the original image and 16 bits deep if the maximum label value exceeds 255. To determine if a 16-bit buffer is necessary, perform an M_MAX_LABEL inquiry, using MblobInquire. The number of blobs alone does not tell you the maximum label value (label values are not necessarily contiguous).
The Mode parameter specifies whether or not to clear the destination image buffer before drawing the labeled image into it. This parameter can be set to one of the following:
M_CLEAR | Clear the destination image buffer before placing the labeled image into it. |
M_NO_CLEAR | Do not clear the destination image buffer before placing the labeled image into it (background pixels will be unchanged). |
See also