| MIL 10 Reference
| Customize Help
| Save Settings

McalAlloc



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
Previous
Synopsis
Allocate a calibration context or a fixturing offset object.
Syntax
MIL_ID McalAlloc(
MIL_ID SystemId, //in
MIL_INT64 Mode, //in
MIL_INT64 ModeFlag, //in
MIL_ID *CalibrationIdPtr //out
)
Description

This function allocates a calibration context or a fixturing offset object.

When allocating a calibration context, use McalGrid() or McalList() to define the pixel-to-world mapping for the calibration context. For a uniform pixel-to-world mapping, instead of using McalGrid() or McalList(), use McalUniform().

When allocating a fixturing offset object, use McalFixture() to place the relative coordinate system at a fixed offset from the analysis/processing object.

When the calibration or fixturing offset object is no longer required, you should free it with McalFree().

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

Specifies the system on which to allocate the calibration context. This parameter should be set to one of the following values:

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().

Mode

Specifies the calibration mode, if allocating a calibration context. Otherwise, specifies to allocate a fixturing offset.

When allocating a calibration context, this parameter must be set to one of the following values:

function map For specifying the calibration mode INQ
CollapseValue Description
Collapse M_DEFAULT

Same as M_LINEAR_INTERPOLATION.

Collapse M_3D_ROBOTICS

Specifies a 3D calibration mode for a camera setup with the camera mounted on a robot arm at an unknown position.

Since this mode requires that the image has perspective distortion, you should not use this mode when using a camera with a telecentric lens; telecentric lenses negate perspective effects.

(summarize)
Collapse M_LINEAR_INTERPOLATION

Specifies piecewise linear interpolation mode.

Collapse M_PERSPECTIVE_TRANSFORMATION

Specifies perspective transformation mode.

Collapse M_TSAI_BASED

Specifies a 3D calibration mode based on the technique developed by Roger Y Tsai.

Since this mode requires that the image has perspective distortion, you should not use this mode when using a camera with a telecentric lens; telecentric lenses negate perspective effects.

(summarize)
Collapse M_UNIFORM_TRANSFORMATION

Specifies uniform transformation mode.

When allocating a fixturing offset object, set this parameter to the following value:

function map For setting a fixturing offset
CollapseValue Description
Collapse M_FIXTURING_OFFSET

Specifies to allocate a fixturing offset object, used to store the positional and angular offset of the relative coordinate system from the object to be processed or analyzed when fixturing.

Note that you cannot use a fixturing offset object to calibrate an image.

(summarize)
ModeFlag

Specifies the function's operation flag. Reserved for future expansion. This parameter must be set to M_DEFAULT.

CalibrationIdPtr

Specifies the address in which to return the identifier of the calibration context or fixturing offset object. Since McalAlloc() also returns the identifier, you can set this parameter to M_NULL.

Return value
The returned value is the calibration or fixturing offset object identifier if the allocation is successful. If allocation fails, M_NULL is returned.
Compilation information
Header Include mil.h.
Library Use mil.lib; milcal.lib.
DLL Requires mil.dll; milcal.dll.
DEFAULT HOST DEFAULT 3D ROBOTICS LINEAR INTERPOLATION PERSPECTIVE TRANSFORMATION TSAI BASED UNIFORM TRANSFORMATION FIXTURING OFFSET