| MIL 10 Reference
| Customize Help
| Save Settings

MblobMerge



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
Merge the results of two blob result buffers.
Syntax
void MblobMerge(
MIL_ID SourceResult1, //in
MIL_ID SourceResult2, //in
MIL_ID DestResult, //in
MIL_INT64 ControlFlag //in
)
Description

This function merges the results of two blob result buffers into a single result buffer.

The source results are merged as if they were taken from two vertically adjacent child buffers of one image. As such, the destination result buffer uses the coordinate system of the first result buffer, and positional results from the second result buffer are translated in the Y-direction to take into account this coordinate system change. Border blobs that would touch if they were in one image are grouped into one grouped blob, assigned a single label, and recalculated as if the grouped blobs were one blob. Only features that were calculated for all the individual blobs in the group are recalculated for the new grouped blob; calculations are made using the results of the individual blobs in the group. See the Merging results section of Chapter 5: Blob analysis for more detailed explanations.

Note that after merging the results, you can perform an MblobSelect() operation to further include or exclude blobs in your destination result buffer, but if you perform an MblobCalculate() operation after the merge, all the results in the destination result buffer will be discarded.

The source blob results must:

Note that if you add a specified moment to the feature list (using MblobSelectMoment() with M_GRAYSCALE + M_CENTRAL, or with M_BINARY + M_CENTRAL) and M_SAVE_RUNS is disabled, M_MERGE will not be able to perform the moment calculation.

Furthermore, if you specify a sorting key for result retrieval, the sorting order will not be respected after the merge.

If both source result buffers have the same calibration information (although their results might be from different child images), the destination result buffer will have the same calibration information. If either of the source result buffers is uncalibrated, or if they have different calibration information, the destination result buffer will be uncalibrated.

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
SourceResult1

Specifies the identifier of the first source result buffer. SourceResult1 and SourceResult2 cannot be the same.

SourceResult2

Specifies the identifier of the second source result buffer. SourceResult1 and SourceResult2 cannot be the same.

DestResult

Specifies the identifier of the destination result buffer. DestResult cannot be the same as SourceResult1 or SourceResult2.

ControlFlag

Specifies the control settings for the merge operation. This parameter can be set to any combination of the following.

function map For specifying the type of merge operation
CollapseValue Description
Collapse M_DEFAULT

Specifies the default control operation.

The default combination is M_TOP_BOTTOM + M_COPY, in which the source results are copied into the destination result buffer, and the orientation of the merged result will be as if the source results were taken from two vertically adjacent child buffers of one image.

(summarize)
Collapse M_COPY

Copies the results of SourceResult1 and SourceResult2 into the destination result buffer. After the merge, the original results of SourceResult1 and SourceResult2 remain intact.

(summarize)
Collapse M_MOVE

Moves the results of the source result buffers into the destination result buffer. After the merge, the original results of SourceResult1 and SourceResult2 are emptied.

(summarize)
Collapse M_TOP_BOTTOM

Specifies that the orientation of the merged result will be as if the source results were taken from two vertically adjacent child buffers of one image.

Compilation information
Header Include mil.h.
Library Use mil.lib; milblob.lib.
DLL Requires mil.dll; milblob.dll.
DEFAULT COPY MOVE TOP BOTTOM