| MIL 10 Reference
| Customize Help
| Save Settings

M3dmapCalibrate



See also
Availability
Not available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
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 setup 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 18: 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 setup 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. However, the geometric shape of the depth map, generated using M3dmapExtract(), will not be corrected; only the depth (gray level) is adjusted to reflect the real depth. 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 18: 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 if there is complementary information.
Parameters
This function is not supported on the selected boards.
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 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 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