Fill blobs that meet a given criterion.
void MblobFill(BlobResId, DestImageBufId, Criterion, Value)
|MIL_ID BlobResId;||Blob analysis result buffer identifier|
|MIL_ID DestImageBufId;||Destination image buffer identifier|
|long Criterion;||Fill criterion|
|long Value;||Fill value|
This function draws, in an image, those blobs that meet a specified criterion. Note, only those that meet the criterion are drawn; other blobs and background pixels are not drawn.
This function is often used to remove unwanted (excluded or deleted) blobs from the identifier image (by filling them with the background color), or to highlight included blobs in a different color. Therefore, an appropriate destination image is the blob identifier image (or a copy of it) associated with the result buffer, or another image buffer that has been cleared.
MblobCalculate must have been called prior to using this function.
The BlobResId parameter specifies the identifier of the blob analysis result buffer.
The DestImageBufId parameter specifies the identifier of the destination image buffer. This buffer must be at least the same size as the identifier image associated with the specified blob analysis result buffer.
The Criterion parameter specifies which blobs to fill with the specified value. This parameter can be set to one of the following values:
|M_INCLUDED_BLOBS||Fill all currently included blobs with the specified value.|
|M_EXCLUDED_BLOBS||Fill all currently excluded blobs with the specified value.|
|M_ALL_BLOBS||Fill all blobs with the specified value.|
The status of the blobs (included or excluded) is taken from the blob analysis result buffer. By default, all blobs in the result buffer are included for future operations. To change the status of a blob, use MblobSelect.
The Value parameter specifies the value with which to fill the blobs that meet the specified criterion. If the destination buffer is binary, this value must be 0 or 1.
This function is optimized for packed binary buffers.