| MIL 10 Reference
| Customize Help
| Save Settings

M3dmapAlloc



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
Allocate a 3D reconstruction context, a pairwise 3D alignment context, or a geometry object.
Syntax
MIL_ID M3dmapAlloc(
MIL_ID SysId, //in
MIL_INT64 ContextType, //in
MIL_INT64 ControlFlag, //in
MIL_ID *ContextOrGeometry3dmapIdPtr //out
)
Description

This function allocates a 3D reconstruction context, a pairwise 3D alignment context, or a geometry object on the specified system. When the context or geometry object is no longer required, you should release its memory, using M3dmapFree().

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
SysId INQ

Specifies the identifier of the system on which to allocate the 3D reconstruction context or geometry object.

function map For specifying the system
CollapseValue Description
Collapse M_DEFAULT_HOST

Specifies the default Host system of the current MIL application.

Collapse MIL system identifier

Specifies a valid system identifier, previously allocated using MsysAlloc().

ContextType

Specifies to allocate a 3D reconstruction context or geometry object. This parameter must be set to one of the following:

function map For specifying the type
CollapseValue Description
Collapse M_GEOMETRY

Specifies a geometry object.

Collapse M_LASER

Specifies a 3D reconstruction context that will be used to perform laser line profiling.

Collapse M_PAIRWISE_ALIGNMENT_CONTEXT

Specifies a pairwise 3D alignment context that will be used to find the transformation that aligns two 3D point clouds together (3D registration).

ControlFlag INQ

Specifies the 3D reconstruction mode of the context, which determines how data is represented. The data representation determines whether depth maps can be fully corrected and whether 3D point clouds can be returned.

If allocating a geometry object or a pairwise alignment context, this parameter must be set to M_DEFAULT.

If allocating a 3D reconstruction context, this parameter must be set to one of the following values:

function map For specifying the 3D reconstruction mode
CollapseValue Description
Collapse M_CALIBRATED_CAMERA_LINEAR_MOTION +

Specifies that the 3D reconstruction context will include camera calibration information and depth correction information. This allows for the storage of 3D point clouds and the generation of fully corrected depth maps (shape and depth corrected).

Note that the calibration context of the camera setup must have been allocated using M3dmapAlloc() with M_TSAI_BASED or M_3D_ROBOTICS.

(summarize)
Collapse M_DEPTH_CORRECTION

Specifies that the 3D reconstruction context will include depth correction information, but will not include camera calibration information. This allows for only partially corrected depth maps (depth, but not shape corrected).

(summarize)
Combination constants for M_CALIBRATED_CAMERA_LINEAR_MOTION.

You can add one or more of the following values to the above-mentioned value to set the label of the camera or laser. This is necessary when creating a multiple camera-laser pair setup.

function map For specifying the camera label or laser label for a given context
CollapseCombination value Description
Collapse

Specifies the label for the camera used by this 3D reconstruction context.

Note that multiple 3D reconstruction contexts can share the same camera, and in those cases, they must also share the same camera label.

(summarize)
Parameters

Specifies the label value. The default value is 1.

1 <= Value <= 1023

This value must be between 1 and 1023.

Collapse

Specifies the label for the laser used by this 3D reconstruction context.

Note that multiple 3D reconstruction contexts can share the same laser, and in those cases, they must also share the same laser label.

(summarize)
Parameters

Specifies the label value. The default value is 1.

1 <= Value <= 2047

This value must be between 1 and 2047.

ContextOrGeometry3dmapIdPtr

Specifies the address of the variable in which to write the 3D reconstruction context or geometry object identifier. Since the M3dmapAlloc() function also returns the identifier, you can set this parameter to M_NULL.

Return value
The returned value is the 3D reconstruction context or geometry object identifier if allocation is successful. If allocation fails, M_NULL is returned.
Compilation information
Header Include mil.h.
Library Use mil.lib; mil3dmap.lib.
DLL Requires mil.dll; mil3dmap.dll.
DEFAULT HOST GEOMETRY LASER PAIRWISE ALIGNMENT CONTEXT CALIBRATED CAMERA LINEAR MOTION DEPTH CORRECTION LASER