| Customize Help
| Save Settings

McalUniform



Function Map
Synopsis
Calibrate an image or a camera 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 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 the Coordinate systems section of Chapter 26: 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 camera calibration, see the Uniform camera calibration and other camera calibration modes section of Chapter 26: 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 which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
CalibrationOrImageId

Specifies the identifier of the camera 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