| Customize Help
| Save Settings

MblobMerge



Function Map
Synopsis
Merge the results of two blob result buffers.
Syntax
void MblobMerge(
MIL_ID SrcResultBlobId1, //in
MIL_ID SrcResultBlobId2, //in
MIL_ID DstResultBlobId, //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 6: 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 have been calculated by a context that:

Note that if you add a specified moment to the context (using MblobControl() with M_MOMENT_GENERAL 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 camera calibration information (although their results might be from different child images), the destination result buffer will have the same camera calibration information. If either of the source result buffers is uncalibrated, or if they have different camera 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 which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
SrcResultBlobId1

Specifies the identifier of the first source result buffer. SrcResultBlobId1 and SrcResultBlobId2 cannot be the same.

SrcResultBlobId2

Specifies the identifier of the second source result buffer. SrcResultBlobId1 and SrcResultBlobId2 cannot be the same.

DstResultBlobId

Specifies the identifier of the destination result buffer. DstResultBlobId cannot be the same as SrcResultBlobId1 or SrcResultBlobId2.

ControlFlag

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

function map For specifying the type of merge operation
Click to summarizeValue Description
Click to summarize M_DEFAULT

Specifies the default control operation.

The default value is 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)
Click to summarize M_COPY

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

(summarize)
Click to summarize M_MOVE

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

(summarize)
Compilation information
Header Include mil.h.
Library Use mil.lib; milblob.lib.
DLL Requires mil.dll; milblob.dll.
DEFAULT COPY MOVE