| Customize Help

Steps to perform the pairwise 3D registration operation



To perform pairwise 3D registration, you must:

  1. Allocate a pairwise 3D registration context using M3dregAlloc() with M_PAIRWISE_REGISTRATION_CONTEXT.

  2. Allocate a pairwise 3D registration result buffer using M3dregAllocResult() with M_PAIRWISE_REGISTRATION_RESULT. The registration results will be written to this result buffer.

  3. Specify the number of registration elements in your pairwise 3D registration context using M3dregControl() with M_NUMBER_OF_REGISTRATION_ELEMENTS. Each registration element controls how to perform the registration of its associated point cloud container. The number of registration elements should correspond to the number of containers with 3D-processible point clouds that you intend to register.

  4. Define the mode of preregistration using M3dregControl() with M_PREREGISTRATION_MODE. For the ICP algorithm to begin, a point cloud must initially be positioned relatively close to its reference point cloud; otherwise, the points will be too far apart to be paired. The different preregistration modes offer different ways to specify a rough location for your point cloud.

  5. If necessary, adjust the default settings and stop conditions of the iterative pairwise 3D registration operation, using M3dregControl(). For example, you can specify the registration operation to stop after a certain number of iterations.

  6. Call M3dregCalculate(), specifying the previously allocated pairwise 3D registration context and pairwise 3D registration result buffer in which to write the registration results.

  7. Retrieve the required results from the pairwise 3D registration result buffer, using M3dregGetResult() and M3dregCopyResult(). You can retrieve the transformation matrix that aligns any point cloud in the pairwise 3D registration context to any other point cloud from the same pairwise 3D registration context.

  8. If necessary, use the results to merge the points clouds into one new point cloud using M3dregMerge().

  9. If necessary, save your pairwise 3D registration context and pairwise 3D registration result buffer using M3dregSave() or M3dregStream().

  10. Free your pairwise 3D registration context and pairwise 3D registration result buffer using M3dregFree().

Note that for applications that are merging point clouds from multiple fixed 3D sensors into a single point cloud, you can avoid performing steps 1-7 multiple times. To do so, save (M3dregSave()) the result buffer, and then restore (M3dregRestore()) and reuse it with M3dregMerge().