| MIL 10 Reference
| Customize Help
| Save Settings

McalUniform



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 an image or a calibration context by specifying the translation, scale and offset of the absolute world coordinate system.
Syntax
void McalUniform(
MIL_ID CalibrationOrImageId, //in
MIL_DOUBLE WorldPosX, //in
MIL_DOUBLE WorldPosY, //in
MIL_DOUBLE PixelSizeX, //in
MIL_DOUBLE PixelSizeY, //in
MIL_DOUBLE PixelRotation, //in
MIL_INT64 ControlFlag //in
)
Description

This function allows you to calibrate an image or a calibration context with a uniform calibration, by specifying the translation, rotation, and scale of the transformation between pixel and world units. You do not need to allocate a calibration context or supply an image of a grid or a list as with the other calibration modes. If you choose to apply McalUniform() to a calibration context, however, you must allocate the calibration context using McalAlloc() with M_UNIFORM_TRANSFORMATION. If you apply McalUniform() to an image, the associated calibration context will be M_DEFAULT_UNIFORM_CALIBRATION.

The origin of the relative coordinate system and of the tool coordinate system will be set at (0,0) in the absolute coordinate system. For more information on coordinate systems, see the Coordinate systems section of Chapter 25: Calibrating your camera setup.

The following linear transformations are used to relate the pixel coordinate system, in pixels, to the absolute coordinate system, in world units:

where:

If the PixelRotation parameter is set to 0 and the same pixel size is specified in X and Y, the image will be considered corrected.

For more information on uniform calibration, see the Uniform calibration and other calibration modes section of Chapter 25: Calibrating your camera setup.

If you adjust the coordinate system of a calibrated image associated with an M_VECTOR_AND_RASTER ROI, the raster information will be discarded, causing the ROI to become an M_VECTOR ROI. 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
CalibrationOrImageId

Specifies the identifier of the calibration context or of the image to calibrate.

WorldPosX INQ

Specifies the X-position in the absolute coordinate system of the center of the top-left pixel of the image.

WorldPosY INQ

Specifies the Y-position in the absolute coordinate system of the center of the top-left pixel of the image.

PixelSizeX INQ

Specifies the scale between the world and pixel units in the X-direction. Specify the scale in world units per pixel. The scale must be a positive value.

PixelSizeY INQ

Specifies the scale between the world and pixel units in the Y-direction. Specify the scale in world units per pixel. The scale must be a positive value.

PixelRotation INQ

Specifies the angle of the X-axis of the pixel coordinate system measured in the absolute coordinate system, in degrees. A positive value indicates a counter-clockwise rotation (from the positive X-axis toward the negative Y-axis).

ControlFlag

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

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