Skip to main content

McalUniform

BoardSupported
Host SystemYes
V4L2Yes
Clarity UHDYes
Concord PoENo
GenTLYes
GevIQYes
GigE VisionYes
IndioNo
Iris GTXYes
Radient eV-CLYes
Rapixo CLYes
Rapixo CoFYes
Rapixo CXPYes
USB3 VisionYes

Calibrate an image or a camera calibration context by specifying the translation, scale and offset of the absolute world coordinate system.

Syntax

void McalUniform(
AIL_ID CalibrationOrImageId, //out
AIL_DOUBLE WorldPosX, //in
AIL_DOUBLE WorldPosY, //in
AIL_DOUBLE PixelSizeX, //in
AIL_DOUBLE PixelSizeY, //in
AIL_DOUBLE PixelRotation, //in
AIL_INT64 ControlFlag //in
)

Description

This function allows you to calibrate an image or a camera calibration context with a uniform camera calibration, by specifying the translation, rotation, and scale of the transformation between pixel and world units. You do not need to allocate a camera calibration context or supply an image of a grid or a list as with the other camera calibration modes. If you choose to apply McalUniform to a camera calibration context, however, you must allocate the camera calibration context using McalAlloc with M_UNIFORM_TRANSFORMATION. If you apply McalUniform to an image, the associated camera 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 Coordinate systems.

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

[Image: uniform_p_to_w.png]

[Image: uniform_w_to_p.png]

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 camera calibration, see Camera calibration modes.

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.

Parameters

CalibrationOrImageId (out, AIL_ID)

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

WorldPosX (in, AIL_DOUBLE)

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

WorldPosY (in, AIL_DOUBLE)

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

PixelSizeX (in, AIL_DOUBLE)

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 (in, AIL_DOUBLE)

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 (in, AIL_DOUBLE)

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 (in, AIL_INT64)

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

Copyright © 2026 Zebra Technologies.