| Customize Help
| Save Settings

M3dregMerge



Function Map
Synopsis
Merge point clouds using the results of a previous call to M3dregCalculate().
Syntax
void M3dregMerge(
MIL_ID Result3dregId, //in
const MIL_ID *ContainerBufIdArrayPtr, //in
MIL_INT NumContainers, //in
MIL_ID DstContainerBufId, //in
MIL_ID SubsampleContext3dimId, //in
MIL_INT64 ControlFlag //in
)
Description

This function merges all the specified point clouds into a single point cloud. Prior to merging the point clouds, it transforms them such that their working coordinate system is aligned with the global coordinate system; it does so using the results that were stored in the 3D registration result buffer after a successful call to M3dregCalculate(). These transformations ensure that the points are all expressed relative to the same coordinate system.

Each point cloud in the array of containers is associated with the registration result element with the same index (for example, the third container in the array is associated with the third registration result element). For the point cloud to be transformed to the appropriate location in the global coordinate system, its index in the array must match the index of the registration result element containing the point cloud's transformation.

Optionally, you can specify a subsampling context to subsample the point clouds after the merge has completed. Whether the merged point cloud is organized or unorganized depends on the subsampling mode of the subsampling context (specified using M3dimControl() with M_SUBSAMPLE_MODE). Note that this subsampling is unrelated to the subsampling done before calling M3dregCalculate() (specified using M3dregControl() with M_SUBSAMPLE). The latter defines which points are used in calculations for the registration operation, and does not specify which points are retained after calling this function.

Note that for applications that are, for example, merging point clouds from multiple fixed 3D sensors into a single point cloud, you can save (M3dregSave()) and restore (M3dregRestore()) a 3D registration result buffer, and reuse it with M3dregMerge().

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
Result3dregId

Specifies the identifier of the pairwise 3D registration result buffer. The pairwise 3D registration result buffer must have been successfully allocated using M3dregAllocResult(), and contain the result of a successful call to M3dregCalculate().

ContainerBufIdArrayPtr
Accepts the address of one of the following:
  • array of type MIL_ID [optionally, in C++: a reference to a constant std::vector<MIL_ID> ] (and a maximum array rank for C# of 1)
    Required array size:(NumContainers)

Specifies the address of the array containing the identifiers of the point cloud containers. The point clouds must be 3D-processable. You can check that the point clouds are 3D-processable using MbufInquireContainer() with M_3D_PROCESSABLE. You can set some entries in the array to M_NULL to merge a subset of the point clouds.

NumContainers

Specifies the size of the array passed to ContainerBufIdArrayPtr.

When using a standard vector (std::vector) overload function in C++, you can pass M_DEFAULT to this parameter and MIL will automatically determine the size based on the number of items in the vector passed to the ContainerBufIdArrayPtr parameter.

function map For specifying the number of containers in the array
Click to summarizeValue Description
Click to summarize 2 <= Value <= M3dregInquire(Result3dregId,
M_NUMBER_OF_REGISTRATION_ELEMENTS)

Specifies the size of the array.

DstContainerBufId

Specifies the identifier of the destination container in which to store the transformed and merged point clouds. The container must have been previously allocated using MbufAllocContainer() with M_PROC.

SubsampleContext3dimId

Specifies the identifier of a 3D image processing subsampling context. This context is used to subsample the resulting point cloud after the merging is complete. If no subsampling is required, set this parameter to M_DEFAULT.

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; mil3dreg.lib.
DLL Requires mil.dll; mil3dreg.dll.
PROC TRUE NUMBER OF REGISTRATION ELEMENTS) PROC