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 |
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().
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().
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.
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.
For specifying the number of containers in the
array
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
2 <= Value <=
M3dregInquire(Result3dregId, M_NUMBER_OF_REGISTRATION_ELEMENTS) |
Specifies the size of the array. |
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.
Header | Include mil.h. |
Library | Use mil.lib; mil3dreg.lib. |
DLL | Requires mil.dll; mil3dreg.dll. |