| Customize Help
| Save Settings

M3dmapCalibrate



Function Map
Synopsis
Calibrate a 3D reconstruction setup.
Syntax
void M3dmapCalibrate(
MIL_ID Context3dmapId, //in
MIL_ID Result3dmapId, //in
MIL_ID ContextCalId, //in
MIL_INT64 ControlFlag //in
)
Description

This function calibrates your 3D reconstruction setup.

If the specified 3D reconstruction context is set to generate fully corrected depth maps (M_CALIBRATED_CAMERA_LINEAR_MOTION 3D reconstruction mode), the 3D reconstruction calibration is done using the specified camera calibration context and the extracted laser line data stored in the result buffer. In this mode, the following setup constraints must be met:

  • You must specify a 3D-based camera calibration context (M_TSAI_BASED or M_3D_ROBOTICS).

  • If the laser plane is not perpendicular to the object's motion (that is, if it is not perfectly vertical), the result buffer must contain laser line data extracted from multiple reference planes (multiple calls to M3dmapAddScan()). The laser plane is assumed to be perfectly vertical if a single reference plane is used.

  • The laser line on the XY-plane (Z=0) must be perfectly perpendicular to the object's motion.

  • The camera must have a sufficient angle with respect to the Z-axis to have accurate results; that is, the camera must be able to grab meaningful displacements of the laser line for different depths. For more information, see the Camera angle requirement subsection of the Configuring the laser line profiling setup section of Chapter 40: 3D reconstruction using laser line profiling.

If the specified 3D reconstruction context is set to generate partially corrected depth maps (M_DEPTH_CORRECTION 3D reconstruction mode), the 3D reconstruction calibration is done with the extracted laser line data stored in the result buffer. With this type of context, there is no constraint on the orientation of the laser plane; that is, it does not need to be perfectly vertical or perpendicular to the object's motion. You do not need to provide a camera calibration context and the ContextCalId parameter must be set to M_NULL.

For the steps required to calibrate your 3D reconstruction setup in either mode, see the Calibrating your 3D reconstruction setup to create a point cloud section of Chapter 40: 3D reconstruction using laser line profiling.

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
Context3dmapId

Specifies the identifier of the 3D reconstruction context used to extract the laser line from grabbed images. The context must have been previously allocated on the required system using M3dmapAlloc().

Result3dmapId

Specifies the identifier of the 3D reconstruction result buffer that contains the laser line data required for calibration. The 3D reconstruction result buffer must have been previously allocated using M3dmapAllocResult() and contain data for at least one laser line.

ContextCalId

Specifies the identifier of the camera calibration context that contains the 3D camera calibration data or M_NULL.

For fully corrected depth maps, this parameter must be set to the identifier of a camera calibration context allocated using McalAlloc() with M_TSAI_BASED or M_3D_ROBOTICS.

For partially corrected depth maps, this parameter must be set to M_NULL.

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; mil3dmap.lib.
DLL Requires mil.dll; mil3dmap.dll.
3D ROBOTICS TSAI BASED