MIL_ID SourceResult1, | //in |
MIL_ID SourceResult2, | //in |
MIL_ID DestResult, | //in |
MIL_INT64 ControlFlag | //in |
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:
Have the same run information saving mode (M_SAVE_RUNS set to M_ENABLE or M_DISABLE).
Have the same pixel aspect ratio (M_PIXEL_ASPECT_RATIO).
Have the same lattice (M_LATTICE).
Have the same blob identification mode (M_BLOB_IDENTIFICATION). If the blob result buffers have M_BLOB_IDENTIFICATION set to M_LABELED, they cannot be merged.
Have the same number of Ferets (M_NUMBER_OF_FERETS).
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.
Specifies the identifier of the first source result buffer. SourceResult1 and SourceResult2 cannot be the same.
Specifies the identifier of the second source result buffer. SourceResult1 and SourceResult2 cannot be the same.
Specifies the identifier of the destination result buffer. DestResult cannot be the same as SourceResult1 or SourceResult2.
Specifies the control settings for the merge operation. This parameter can be set to any combination of the following.
For specifying the type of merge
operation
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default control operation. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_COPY |
Copies the results of SourceResult1 and SourceResult2 into the destination result buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MOVE |
Moves the results of the source result buffers into the destination result buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
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. |
Header | Include mil.h. |
Library | Use mil.lib; milblob.lib. |
DLL | Requires mil.dll; milblob.dll. |