| MIL 10 Reference
| Customize Help
| Save Settings

MblobFill



See also
Availability
Not available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Draw blobs that meet a specified fill criterion.
Syntax
void MblobFill(
MIL_ID BlobResId, //in
MIL_ID DestImageBufId, //in
MIL_INT64 Criterion, //in
MIL_INT Value //in
)
Description

This function draws, in an image, those blobs that meet a specified fill criterion with the specified fill value.

This function is often used to remove unwanted (excluded or deleted) blobs from the identifier image (by drawing 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.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
BlobResId

Specifies the identifier of the blob analysis result buffer.

DestImageBufId

Specifies the identifier of the destination image buffer. This must be a single band, packed binary, 8, or 16-bit unsigned buffer. Note, this buffer need not be the same size as the original identifier image used to calculate the blobs.

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.

Criterion

Specifies which blobs to draw 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().

This parameter can be set to one of the following values:

function map For specifying which blobs to draw
CollapseValue Description
Collapse M_ALL_BLOBS +

Draws all blobs with the specified fill value.

Collapse M_EXCLUDED_BLOBS +

Draws all currently excluded blobs with the specified fill value.

Collapse M_INCLUDED_BLOBS +

Draws all currently included blobs with the specified fill value.

Combination constant for any of the possible values of the Criterion parameter.

You can add the following value to the above-mentioned values to set whether the blob's border should be filled.

function map For the Criterion parameter
CollapseCombination value Description
Collapse M_CONTOUR

Specifies that only the blob's borders should be filled.

M_CONTOUR uses the coordinates obtained from chained pixels to draw the borders; therefore, if you have already calculated M_CHAINS with MblobCalculate(), M_CONTOUR will operate faster.

If you are using M_CONTOUR, you cannot use MblobControl() with M_BLOB_IDENTIFICATION set to M_LABELED_TOUCHING.

(summarize)
Value

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.

Compilation information
Header Include mil.h.
Library Use mil.lib; milblob.lib.
DLL Requires mil.dll; milblob.dll.
UNSIGNED PROC NONE ALL BLOBS EXCLUDED BLOBS INCLUDED BLOBS CONTOUR