| MIL 10 Reference
| Customize Help
| Save Settings

McalAssociate



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
Associate/disassociate a calibration context with/from an image or digitizer.
Syntax
void McalAssociate(
MIL_ID SrcCalibrationOrMilId, //in
MIL_ID TargetImageOrDigitizerId, //in
MIL_INT64 ControlFlag //in
)
Description

This function associates a calibration context with an image or digitizer. This function can also be used to disassociate a calibration context from an image or digitizer. Note that you do not have to first disassociate a calibration context from an image or digitizer to associate it with a different calibration context.

When you grab an image with a calibrated digitizer, the calibration context currently associated with the digitizer gets associated with the grabbed image.

When you associate a calibration context with an image using McalAssociate() or by grabbing with a calibrated digitizer, the image receives a copy of the calibration context's current coordinate systems and a reference to the calibration context for all other settings. When you associate a calibration context with a digitizer, the digitizer only receives a reference to the calibration context.

When associating a calibration context with an image, its child buffers, if any, will also be associated with the same calibration context. However, any previous calibration information of the child buffers will be overwritten by the new context associated with the parent.

If you copy or process the calibrated image, the operation will typically copy the image's calibration settings to the destination image. If multiple source images are used for the operation, the destination image will only receive a copy of the calibration information if the source images have the same calibration information. For more information, see the Calibration propagation section of Chapter 25: Calibrating your camera setup.

If you associate a calibration context with an image buffer containing an ROI, all graphic elements in the graphics list that were created in world units (using MgraControl() with M_INPUT_UNITS set to M_WORLD) will be associated with the same callibration information as the image; all other graphic elements in the graphics list, as well as any generated raster information, will not be calibrated. See MbufSetRegion() for more information.

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
SrcCalibrationOrMilId

Specifies the calibration context to associate. This parameter can be set to one of the following. If an image buffer, digitizer or result buffer is passed to this parameter, the calibration context associated with that object is used; calibration settings saved with the image, digitizer or result are also copied.

function map For specifying the calibration context to associate with
CollapseValue Description
Collapse M_NULL

Specifies to remove the association between the calibration context and the image or digitizer.

Collapse Calibration context identifier

Specifies the calibration context to associate with the target image or digitizer.

Collapse Image buffer identifier

Specifies the image whose calibration information and reference to a calibration context will be associated with the target image or digitizer.

Collapse Processing or analysis module result buffer
identifier

Specifies the processing or analysis module result whose calibration information and reference to a calibration context will be associated with the target image or digitizer.

TargetImageOrDigitizerId

Specifies the identifier of the image or digitizer with which to associate the calibration context.

ControlFlag

Specifies the function's control flag. This parameter must be set to the following value:

function map For specifying the function's control flag
CollapseValue Description
Collapse M_DEFAULT

Sets the function's control to the default.

Compilation information
Header Include mil.h.
Library Use mil.lib; milcal.lib.
DLL Requires mil.dll; milcal.dll.
NULL PROC DEFAULT