| MIL 10 Reference
| Customize Help
| Save Settings

McalInquire



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
Inquire about a calibration context, a calibrated image, a calibrated result buffer, a fixturing offset setting, or about the calibration state of an image, digitizer, or result buffer.
Syntax
MIL_INT McalInquire(
MIL_ID CalibrationOrMilId, //in
MIL_INT64 InquireType, //in
void *UserVarPtr //out
)
Description

This function inquires about a setting of a calibration context, a calibrated image, a calibrated result buffer, or a fixturing offset. It can also be used to determine if a calibration context is associated with an image, digitizer, or result buffer, and whether or not an image has been corrected.

When working in M_3D_ROBOTICS calibration mode, the function returns information about the last calibration performed on that object. To inquire about previous calibration poses within the M_3D_ROBOTICS calibration context, you can use McalInquireSingle() with the Index parameter set to the required calibration pose.

If the inquired setting is set to M_DEFAULT (for example, using McalControl()), McalInquire() will return M_DEFAULT. To inquire the actual default value, add M_DEFAULT to the InquireType parameter.

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
CalibrationOrMilId

Specifies the identifier of the calibration context, image buffer, result buffer, or digitizer.

InquireType

Specifies the setting about which to inquire. The setting for InquireType depends on whether you are inquiring about a calibration context, image, result buffer, or digitizer.

See the Parameter associations section for possible values that can be specified.

UserVarPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • array of type MIL_DOUBLE
  • char
  • MIL_DOUBLE
  • MIL_FLOAT
  • MIL_ID
  • MIL_INT
  • MIL_INT16
  • MIL_INT32
  • MIL_INT64

Specifies the address in which to return the value of the inquired setting.

Since McalInquire() also returns the value of the inquired setting, you can set UserVarPtr to M_NULL.

See the Parameter associations section for possible values that can be returned.

For a calibration context, InquireType can be set to one of the following.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_DOUBLE.

function map For a calibration context
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_CALIBRATION_PLANE +

Inquires the plane in which the calibration points are defined. SET

(summarize)
Collapse M_DEFAULT

Same as M_ABSOLUTE_COORDINATE_SYSTEM.

Collapse M_ABSOLUTE_COORDINATE_SYSTEM

Specifies that the calibration points are defined in the absolute coordinate system.

Collapse M_RELATIVE_COORDINATE_SYSTEM

Specifies that the calibration points are defined in the relative coordinate system.

Collapse M_CALIBRATION_STATUS +

Inquires the status of a calibration.

(summarize)
Collapse M_CALIBRATED

Specifies that the calibration was successful.

Collapse M_CALIBRATING

Specifies that the last call to McalGrid() / McalList() was made with M_ACCUMULATE and the calibration was successful.

Collapse M_GRID_NOT_FOUND

Specifies that McalGrid() was unable to find an appropriate calibration grid in the provided image.

Collapse M_INVALID_CALIBRATION_POINTS

Specifies that the provided calibration points do not contain sufficient spatial information to perform a calibration.

Collapse M_MATHEMATICAL_EXCEPTION

Specifies that the calculation of the camera's parameters has failed.

Collapse M_NOT_INITIALIZED

Specifies that no calibration has been performed yet.

Collapse M_PLANE_ANGLE_TOO_SMALL

Specifies that the camera's optical axis is not sufficiently inclined. For full M_TSAI_BASED calibration, the camera's optical axis should be placed at least at a 30-degrees angle away from the axis perpendicular to the camera calibration plane.

(summarize)
Collapse M_TOO_MANY_OUTLIERS

Specifies that the calculation performed by McalGrid() or McalList() with M_DISPLACE_CAMERA_COORD or M_DISPLACE_RELATIVE_COORD has failed. There were too many possible outliers to correctly compute the new location of the coordinate system.

(summarize)
Collapse M_LINK_TOOL_AND_CAMERA +

Inquires whether a rigid link exists between the camera coordinate system and the tool coordinate system. SET

(summarize)
Collapse M_DEFAULT

Same as M_ENABLE.

Collapse M_DISABLE

Specifies to remove the link between the two coordinate systems, allowing both to be moved independently.

Collapse M_ENABLE

Specifies to link the two coordinate systems, allowing both to be moved together.

Collapse M_LOCALIZATION_NB_ITERATIONS_MAX +

Inquires the maximum number of iterations to attempt to fit the provided points when calculating the new position of the camera or relative coordinate system, when using McalList() and McalGrid() with M_DISPLACE_CAMERA_COORD or M_DISPLACE_RELATIVE_COORD respectively. SET

(summarize)
Collapse M_DEFAULT

Specifies the default value; the default value is 250.

Collapse M_LOCALIZATION_NB_OUTLIERS_MAX +

Inquires the maximum number of possible outliers that can occur in the data set used by McalList() or McalGrid() with M_DISPLACE_CAMERA_COORD or M_DISPLACE_RELATIVE_COORD. SET

(summarize)
Collapse M_DEFAULT

Specifies the default value; the default value is 0.

Collapse M_OWNER_SYSTEM +

Inquires the identifier of the system on which the calibration context has been allocated. SET

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

Collapse M_RELATIVE_ORIGIN_ANGLE +

Inquires the angle of rotation of the relative world coordinate system.

For 2D-based calibration contexts, the angle of rotation is of the relative coordinate system about the Z-axis of the absolute coordinate system. A positive angle corresponds to the rotation of the X-axis in the direction of the negative Y-axis.

For 3D-based calibration contexts (M_TSAI_BASED or M_3D_ROBOTICS), the axis of rotation is not necessarily the Z-axis. The returned value is equivalent to Param4Ptr of M_ROTATION_AXIS_ANGLE in McalGetCoordinateSystem().

The angle of rotation of the relative coordinate system is affected by transformations performed using McalSetCoordinateSystem() or McalRelativeOrigin() with AngularOffset. If you are using a 3D-based calibration context, it is recommended to use McalGetCoordinateSystem(). SET

(summarize)
Collapse Value

Specifies the angle of rotation, in degrees.

Collapse M_RELATIVE_ORIGIN_X +

Inquires the X-coordinate of the origin of the relative world coordinate system.

The X-coordinate of the origin of the relative coordinate system is affected by transformations performed using McalSetCoordinateSystem() or McalRelativeOrigin() with XOffset. If you are using a 3D-based calibration context, it is recommended to use McalSetCoordinateSystem(). SET

(summarize)
Collapse Value

Specifies the X-coordinate.

Collapse M_RELATIVE_ORIGIN_Y +

Inquires the Y-coordinate of the origin of the relative world coordinate system.

The Y-coordinate of the origin of the relative coordinate system is affected by transformations performed using McalSetCoordinateSystem() or McalRelativeOrigin() with YOffset. If you are using a 3D-based calibration context, it is recommended to use McalSetCoordinateSystem(). SET

(summarize)
Collapse Value

Specifies the Y-coordinate.

Collapse M_RELATIVE_ORIGIN_Z +

Inquires the Z-coordinate of the origin of the relative world coordinate system.

The Z-coordinate of the origin of the relative coordinate system is affected by transformations performed using McalSetCoordinateSystem() or McalRelativeOrigin() with ZOffset. If you are using a 3D-based calibration context, it is recommended to use McalSetCoordinateSystem(). SET

(summarize)
Collapse Value

Specifies the Z-coordinate.

Collapse M_TOOL_POSITION_X +

Inquires the X-position of the origin of the tool coordinate system. SET

(summarize)
Collapse Value

Specifies the X-coordinate, in world units.

Collapse M_TOOL_POSITION_Y +

Inquires the Y-position of the origin of the tool coordinate system. SET

(summarize)
Collapse Value

Specifies the Y-coordinate, in world units.

Collapse M_TOOL_POSITION_Z +

Inquires the Z-position of the origin of the tool coordinate system. SET

(summarize)
Collapse M_DEFAULT

Specifies the default value; the default value is 0.0.

Collapse Value

Specifies the Z-coordinate, in world units.

Collapse M_TRANSFORM_CACHE +

Inquires whether a cache is used to accelerate McalTransformImage(). SET

(summarize)
Collapse M_DISABLE

Specifies not to use a cache. INFO

Collapse M_ENABLE

Specifies to use a cache.

The InquireType parameter can be set to one of the following values only after calibration with McalGrid().

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_DOUBLE.

function map For a calibration context calibrated using McalGrid()
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_COLUMN_NUMBER +

Inquires the number of columns in the calibration grid. SET

(summarize)
Collapse Value

Specifies the number of columns.

Collapse M_COLUMN_SPACING +

Inquires the number of world units between columns. SET

(summarize)
Collapse Value

Specifies the spacing between columns.

Collapse M_FOREGROUND_VALUE +

Inquires whether the grid's circles are lighter or darker than the background. SET

(summarize)
Collapse M_DEFAULT

Determines the appropriate setting automatically.

Collapse M_FOREGROUND_BLACK

Specifies that the grid's circles are darker than the background.

Collapse M_FOREGROUND_WHITE

Specifies that the grid's circles are lighter than the background.

Collapse M_GRID_CORNER_HINT_X +

Inquires the approximate pixel X-coordinate of the circle that is actually at the top-left corner of the calibration grid in the real-world. SET

(summarize)
Collapse M_DEFAULT

Same as M_NONE.

Collapse M_NONE

Specifies to use the top-left grid point in the image.

Collapse Value

Specifies the X-coordinate of the hint point, in the image.

Collapse M_GRID_CORNER_HINT_Y +

Inquires the approximate pixel Y-coordinate of the circle that is actually at the top-left corner of the calibration grid in the real-world. SET

(summarize)
Collapse M_DEFAULT

Same as M_NONE.

Collapse M_NONE

Specifies to use the top-left grid point in the image.

Collapse Value

Specifies the Y-coordinate of the hint point, in the image.

Collapse M_GRID_ORIGIN_X +

Inquires the X-position of the top-left circle of a circle grid, or the top-left point connecting four squares in a chessboard grid, in the camera calibration plane coordinate system. SET

(summarize)
Collapse Value

Specifies the X-position.

Collapse M_GRID_ORIGIN_Y +

Inquires the Y-position of the top-left circle of a circle grid, or the top-left point connecting four squares in a chessboard grid, in the camera calibration plane coordinate system. SET

(summarize)
Collapse Value

Specifies the Y-position.

Collapse M_GRID_ORIGIN_Z +

Inquires the Z-position of the top-left circle of a circle grid, or the top-left point connecting four squares in a chessboard grid, in the camera calibration plane coordinate system. SET

(summarize)
Collapse Value

Specifies the Z-position.

Collapse M_GRID_TYPE +

Inquires the type of grid used to perform the calibration. SET

(summarize)
Collapse M_CHESSBOARD_GRID

Specifies a chessboard grid. INFO

Collapse M_CIRCLE_GRID

Specifies a grid of circles. INFO

Collapse M_ROW_NUMBER +

Inquires the number of rows in the calibration grid. SET

(summarize)
Collapse Value

Specifies the number of rows.

Collapse M_ROW_SPACING +

Inquires the spacing between rows in the calibration grid. SET

(summarize)
Collapse Value

Specifies the spacing between rows, in world units.

The InquireType parameter can be set to one of the following values after a call to either McalGrid() or McalList().

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_DOUBLE.

function map For a calibration context calibrated using McalGrid() or McalList()
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_AVERAGE_PIXEL_ERROR +

Inquires the average calibration error in the pixel coordinate system. You can only inquire this value for a successfully calibrated calibration context.

This is the average distance in the pixel coordinate system between the initial calibration points and their projected points in an image.

When working in M_3D_ROBOTICS calibration mode, this only returns the average calibration error of the last calibration call. To return an average calibration error for all calibration grids used, it is recommended to use M_GLOBAL_AVERAGE_PIXEL_ERROR instead.

(summarize)
Collapse Value

Specifies the average calibration error, in pixels.

Collapse M_AVERAGE_WORLD_ERROR +

Inquires the average calibration error in the absolute coordinate system. You can only inquire this value for a successfully calibrated calibration context.

This is the average distance in the absolute coordinate system between the initial calibration points and their projected points in an image.

When working in M_3D_ROBOTICS calibration mode, this only returns the average calibration error of the last calibration call. To return an average calibration error for all calibration grids used, it is recommended to use M_GLOBAL_AVERAGE_WORLD_ERROR instead.

(summarize)
Collapse Value

Specifies the average calibration error, in world units.

Collapse M_CALIBRATION_IMAGE_POINTS_X +

Inquires the X-coordinate of the calibration points in the pixel coordinate system. These coordinates are extracted from the image.

If you used McalList() to calibrate your camera setup, you explicitly set the calibration points' pixel coordinates with the PixCoordXArrayPtr parameter.

If you used McalGrid() to calibrate your camera setup, the calibration points' pixel coordinates are determined by the pixel positions of the circles in a circle grid or the pixel positions of the points connecting four corners in a chessboard grid. SET

(summarize)
Collapse UserVarPtr data type info

Data type: array of type MIL_DOUBLE
Array size: The return value of McalInquire() with M_NUMBER_OF_CALIBRATION_POINTS.

Collapse Value

Specifies the X-coordinate, in pixels.

Collapse M_CALIBRATION_IMAGE_POINTS_Y +

Inquires the Y-coordinate of the calibration points in the pixel coordinate system. These coordinates are extracted from the image.

If you used McalList() to calibrate your camera setup, you explicitly set the calibration points' pixel coordinates with the PixCoordYArrayPtr parameter.

If you used McalGrid() to calibrate your camera setup, the calibration points' pixel coordinates are determined by the pixel positions of the circles in a circle grid or the pixel positions of the points connecting four corners in a chessboard grid. SET

(summarize)
Collapse UserVarPtr data type info

Data type: array of type MIL_DOUBLE
Array size: The return value of McalInquire() with M_NUMBER_OF_CALIBRATION_POINTS.

Collapse Value

Specifies the Y-coordinate, in pixels.

Collapse M_CALIBRATION_WORLD_POINTS_X +

Inquires the X-coordinate of the calibration points, in real-world units of the camera calibration plane (M_CALIBRATION_PLANE). These coordinates are computed based on explicitly specified values.

If you used McalList() to calibrate your camera setup, you explicitly set the calibration points' world coordinates with the WorldCoordXArrayPtr parameter.

If you used McalGrid() to calibrate your camera setup, the calibration points are computed from the parameters GridOffsetX, ColumnNumber, and ColumnSpacing. SET

(summarize)
Collapse UserVarPtr data type info

Data type: array of type MIL_DOUBLE
Array size: The return value of McalInquire() with M_NUMBER_OF_CALIBRATION_POINTS.

Collapse Value

Specifies the X-coordinate, in real-world units of the camera calibration plane (M_CALIBRATION_PLANE).

Collapse M_CALIBRATION_WORLD_POINTS_Y +

Inquires the Y-coordinate of the calibration points, in real-world units of the camera calibration plane (M_CALIBRATION_PLANE). These coordinates are computed based on explicitly specified values.

If you used McalList() to calibrate your camera setup, you explicitly set the calibration points' world coordinates with the WorldCoordYArrayPtr parameter.

If you used McalGrid() to calibrate your camera setup, the calibration points are computed from the parameters GridOffsetY, RowNumber, and RowSpacing. SET

(summarize)
Collapse UserVarPtr data type info

Data type: array of type MIL_DOUBLE
Array size: The return value of McalInquire() with M_NUMBER_OF_CALIBRATION_POINTS.

Collapse Value

Specifies the Y-coordinate, in real-world units of the camera calibration plane (M_CALIBRATION_PLANE).

Collapse M_CALIBRATION_WORLD_POINTS_Z +

Inquires the Z-coordinate of the calibration points, in real-world units of the camera calibration plane (M_CALIBRATION_PLANE). If this value is inquired for 2D-based calibration contexts, the specified array will be filled with 0.0 values. These coordinates are based on explicitly specified values.

If you used McalList() to calibrate your camera setup, you explicitly set the calibration points' pixel coordinates with the WorldCoordZArrayPtr parameter.

If you used McalGrid() to calibrate your camera setup, you explicitly set the Z-coordinate of all the calibration points with the GridOffsetZ parameter. SET

(summarize)
Collapse UserVarPtr data type info

Data type: array of type MIL_DOUBLE
Array size: The return value of McalInquire() with M_NUMBER_OF_CALIBRATION_POINTS.

Collapse Value

Specifies the Z-coordinate, in real-world units of the camera calibration plane (M_CALIBRATION_PLANE).

Collapse M_GLOBAL_AVERAGE_PIXEL_ERROR +

Inquires the average calibration error, in pixels, for all the points used in all successive calls to McalGrid() and McalList(). You can only inquire this value for a successfully calibrated M_3D_ROBOTICS calibration context.

(summarize)
Collapse Value

Specifies the average calibration error, in pixels.

Collapse M_GLOBAL_AVERAGE_WORLD_ERROR +

Inquires the average calibration error, in world units, for all the points used in all successive calls to McalGrid() and McalList(). You can only inquire this value for a successfully calibrated M_3D_ROBOTICS calibration context.

(summarize)
Collapse Value

Specifies the average calibration error, in world units.

Collapse M_GLOBAL_MAXIMUM_PIXEL_ERROR +

Inquires the maximum calibration error, in pixels, for all the points used in all successive calls to McalGrid() and McalList(). You can only inquire this value for a successfully calibrated M_3D_ROBOTICS calibration context.

(summarize)
Collapse Value

Specifies the maximum calibration error, in pixels.

Collapse M_GLOBAL_MAXIMUM_WORLD_ERROR +

Inquires the maximum calibration error, in world units, for all the points used in all successive calls to McalGrid() and McalList(). You can only inquire this value for a successfully calibrated M_3D_ROBOTICS calibration context.

(summarize)
Collapse Value

Specifies the maximum calibration error, in world units.

Collapse M_MAXIMUM_PIXEL_ERROR +

Inquires the maximum calibration error, in pixels. You can only inquire this value for a successfully calibrated calibration context.

For an M_3D_ROBOTICS calibration context, this only returns the average calibration error of the last calibration call. To return an average calibration error for all calibration grids used, it is recommended to use M_GLOBAL_MAXIMUM_PIXEL_ERROR instead.

(summarize)
Collapse Value

Specifies the maximum calibration error, in pixels.

Collapse M_MAXIMUM_WORLD_ERROR +

Inquires the maximum calibration error, in world units. You can only inquire this value for a successfully calibrated calibration context.

For an M_3D_ROBOTICS calibration context, this only returns the average calibration error of the last calibration call. To return an average calibration error for all calibration grids used, it is recommended to use M_GLOBAL_MAXIMUM_WORLD_ERROR instead.

(summarize)
Collapse Value

Specifies the maximum calibration error, in world units.

Collapse M_NUMBER_OF_CALIBRATION_POINTS +

Inquires the number of calibration points found by McalGrid() or passed to McalList().

If you used McalList() to calibrate your camera setup, you can explicitly set the number of calibration points with the NumPoint parameter.

If you used McalGrid() to calibrate your camera setup, the number of calibration points is determined by the number of columns and rows in your grid. SET

(summarize)
Collapse Value

Specifies the number of calibration points.

Collapse M_NUMBER_OF_CALIBRATION_POSES +

Inquires the number of calls made to McalGrid() or McalList() with the same CalibrationOrMilId parameter passed. You can only inquire this value for a successfully calibrated M_3D_ROBOTICS calibration context.

(summarize)
Collapse Value

Specifies the number of calibration poses.

The InquireType parameter can be set to one of the following values after a call to either McalGrid(), McalList(), or McalUniform().

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_DOUBLE.

function map For a calibration context calibrated using McalGrid(), McalList(), or McalUniform()
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_ASPECT_RATIO +

Inquires the average aspect ratio. The ratio is the average pixel width, divided by average pixel height, calculated with world units.

(summarize)
Collapse M_INVALID_SCALE

Specifies that calibration was not successful. This value can also be returned if the camera is positioned and oriented in such a way that all points in the image plane are invalid.

(summarize)
Collapse Value

Specifies the average aspect ratio.

Collapse M_CALIBRATION_INPUT_DATA +

Specifies the type of data that was used to perform the calibration.

(summarize)
Collapse M_GRID

Specifies that the calibration was performed using a calibration grid (McalGrid()).

Collapse M_LIST

Specifies that the calibration was performed by explicitly specifying the correspondence between some pixels and their real-world coordinates (McalList()).

Collapse M_PARAMETRIC

Specifies that the calibration was performed using an explicitly specified translation, scale, and offset from the absolute world coordinate system (McalUniform()).

The InquireType parameter can be set to one of the following values only for an M_TSAI_BASED calibration context.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_DOUBLE.

function map For a M_TSAI_BASED calibration context
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_CCD_ASPECT_RATIO +

Inquires the width to height ratio of the individual elements of the CCD. SET

(summarize)
Collapse 1.0

Specifies that the width and height of the CCD element are equal.

Collapse Value > 0

Specifies the value of the width of a CCD element divided by its height.

Collapse M_DISTORTION_RADIAL_1 +

Inquires the value of the second order radial distortion coefficient used in the calibration algorithm. Radial distortion refers to image distortions caused by the camera's lens.

(summarize)
Collapse Value

Specifies the value of the second order radial distortion coefficient.

Collapse M_FOCAL_LENGTH +

Inquires the effective focal length of the pinhole camera model used in the calibration.

(summarize)
Collapse Value

Specifies the effective focal length of the pinhole camera model, expressed in horizontal pixels.

Collapse M_PRINCIPAL_POINT_X +

Inquires the X-coordinate of the intersection of the camera's optical axis and the image plane. SET

(summarize)
Collapse M_DEFAULT

Specifies that you have not set the corresponding control type using McalControl().

Collapse Value

Specifies the X-coordinate, in pixels.

Collapse M_PRINCIPAL_POINT_Y +

Inquires the Y-coordinate of the intersection of the camera's optical axis and the image plane. SET

(summarize)
Collapse M_DEFAULT

Specifies that you have not set the corresponding control type using McalControl().

Collapse Value

Specifies the Y-coordinate, in pixels.

For any image, result buffer, or digitizer, the InquireType parameter can be set to the following value.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_DOUBLE.

function map For any image, digitizer, or result buffer
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_ASSOCIATED_CALIBRATION +

Inquires the identifier of the associated calibration context.

(summarize)
Collapse M_NULL

Specifies that there is no calibration context associated with the image or digitizer.

Collapse M_DEFAULT_UNIFORM_CALIBRATION

Specifies that the image was calibrated using McalUniform().

Collapse MIL Calibration object identifier

Specifies the calibration context that is associated with the image or digitizer.

For a calibration context, image, or result buffer, the InquireType parameter can be set to the following value.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_DOUBLE.

function map For a calibration context, image, or result buffer
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_CALIBRATION_CATEGORY +

Inquires whether the calibration mode of the specified MIL object is 2D-based or 3D-based. SET

(summarize)
Collapse M_NULL

Specifies the object is not associated with a camera calibration.

Inquiring the calibration category of a calibration context never returns M_NULL.

(summarize)
Collapse M_2D_CALIBRATION

Specifies a 2D-based calibration mode, such as M_LINEAR_INTERPOLATION.

Images with a constant pixel size (including corrected images and depth maps) are always considered to be 2D images with a uniform calibration, regardless of the calibration context they are associated with.

An image with a 2D-based calibration mode cannot be passed as the calibrated object when a 3D-based calibration is required.

(summarize)
Collapse M_3D_CALIBRATION

Specifies a 3D-based calibration mode, such as M_3D_ROBOTICS.

Collapse M_CALIBRATION_MODE +

Inquires the calibration mode of the associated camera calibration of the specified MIL object. SET

(summarize)
Collapse M_NULL

Specifies the MIL object is not associated with a camera calibration.

Inquiring the calibration mode of a calibration context never returns M_NULL.

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

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. INFO

Collapse M_UNIFORM_TRANSFORMATION

Specifies uniform transformation mode.

Images with a constant pixel size (including corrected images and depth maps) are always uniform, even if the calibration mode of their associated calibration is not.

(summarize)
Collapse M_CONSTANT_PIXEL_SIZE +

Inquires whether the image has a constant pixel size.

When inquiring a calibration context, M_CONSTANT_PIXEL_SIZE will always return M_FALSE.

(summarize)
Collapse M_FALSE

Specifies that the image does not have a constant pixel size, or that you are inquiring a calibration context. The size of each pixel depends on the calibration context associated with the image.

(summarize)
Collapse M_TRUE

Specifies that the image has a constant pixel size. Note, however, that pixels are not necessarily square; they can be rectangular and might be rotated.

(summarize)
Collapse M_CORRECTION_STATE +

Inquires whether the image has been physically corrected. Physically corrected images have square pixels with a constant size and no rotation between the pixel and absolute coordinate systems. Images can be corrected using McalTransformImage() with M_FULL_CORRECTION.

When inquiring a calibration context, M_CORRECTION_STATE will always return M_FALSE.

(summarize)
Collapse M_FALSE

Specifies that the image has been neither corrected nor calibrated, or that you are inquiring a calibration context.

Collapse M_TRUE

Specifies that the image has been corrected.

Collapse M_DEPTH_MAP +

Inquires whether the MIL object is a fully corrected depth map.

(summarize)
Collapse M_FALSE

Specifies that the MIL object is not a fully corrected depth map.

Inquiring M_DEPTH_MAP on a calibration context returns M_FALSE.

(summarize)
Collapse M_TRUE

Specifies that the image is a fully corrected depth map.

Note that when M_DEPTH_MAP returns M_TRUE, M_CONSTANT_PIXEL_SIZE also returns M_TRUE and M_GRAY_LEVEL_SIZE_Z cannot return M_INVALID_SCALE.

(summarize)
Collapse M_Y_AXIS_UP +

Inquires whether the Y-axis of the absolute coordinate system is oriented counter-clockwise with respect to its positive X-axis.

If you used McalList() to calibrate your camera setup, the Y-axis orientation was determined by the calibration points that you specified. For more information, see the List of coordinates subsection of the Calibrating using calibration points from a grid or a list section of Chapter 25: Calibrating your camera setup.

If you used McalGrid() to calibrate your camera setup, the explicitly specified Y-axis orientation is used.

Note that this constant does not support images without an associated calibration context. An uncalibrated image will return an error.

(summarize)
Collapse M_FALSE

Specifies that the positive Y-axis is oriented clockwise with respect to the positive X-axis.

Collapse M_TRUE

Specifies that the positive Y-axis is oriented counter-clockwise with respect to the positive X-axis.

If an image, digitizer, or result buffer, is calibrated, the InquireType parameter can be set to one of the following values.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_DOUBLE.

function map For a calibrated image, digitizer, or result buffer
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_CALIBRATION_CHILD_OFFSET_X +

Inquires the X-offset of a child buffer relative to the highest calibrated parent image that was originally associated with the calibration context. SET

(summarize)
Collapse Value

Specifies the X-offset, relative to the child buffer's highest order calibrated parent buffer.

Collapse M_CALIBRATION_CHILD_OFFSET_Y +

Inquires the Y-offset of a child buffer relative to the highest calibrated parent image that was originally associated with the calibration context. SET

(summarize)
Collapse Value

Specifies the Y-offset, relative to the child buffer's highest order calibrated parent buffer.

The following formulas give the relationship between coordinates in pixel units and world units when an image or result buffer is calibrated and has a constant pixel size:

If an image, or result buffer, is calibrated and has a constant pixel-size, the InquireType parameter can be set to one of the following values.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_DOUBLE.

function map For a calibrated image or result buffer, with a constant pixel size
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_GRAY_LEVEL_SIZE_Z +

Inquires the step, in world units, along the Z-axis of the relative coordinate system, represented by one gray level. Since the Z-axis is pointing downwards, positive M_GRAY_LEVEL_SIZE_Z values mean that lower (darker) pixel values represent higher world points (top-black); negative M_GRAY_LEVEL_SIZE_Z values mean that higher (brighter) pixel values represent higher world points (top-white).

This inquire type is only useful when inquiring about an image buffer that contains a depth map. SET

(summarize)
Collapse M_INVALID_SCALE

Specifies that the image is not a depth map.

Collapse Value

Specifies the height, in world units, corresponding to a difference of one gray level. INFO

Collapse M_PIXEL_ROTATION +

Inquires the angle of the X-axis of the pixel coordinate system measured in the relative world coordinate system, starting from the positive X-axis of the relative world coordinate system and going towards its positive Y-axis.

This value corresponds to R in the above formulas. SET

(summarize)
Collapse Value

Specifies the angle, in degrees.

Collapse M_PIXEL_SIZE_X +

Inquires the width of the pixels in the corrected image.

You can multiply a measure in pixels, along the X-axis, by M_PIXEL_SIZE_X to get the measure in world units. If there is rotation between the relative world coordinate system and the pixel coordinate system, this distance won't be along the X-axis of the relative world coordinate system.

This value corresponds to Sx in the above formulas. SET

(summarize)
Collapse Value

Specifies the width, in world units/pixel.

Collapse M_PIXEL_SIZE_Y +

Inquires the height of the pixels in the corrected image.

You can multiply a measure in pixels, along the Y-axis, by M_PIXEL_SIZE_Y to get the measure in world units. If there is rotation between the relative world coordinate system and the pixel coordinate system, this distance won't be along the Y-axis of the relative world coordinate system.

This value corresponds to Sy in the above formulas. SET

(summarize)
Collapse Value

Specifies the height, in world units/pixel.

Collapse M_WORLD_POS_X +

Inquires the X-coordinate of the center of the top-left pixel in the corrected image. This value corresponds to Tx in the above formulas. SET

(summarize)
Collapse Value

Specifies the X-coordinate, expressed in the relative world coordinate system.

Collapse M_WORLD_POS_Y +

Inquires the Y-coordinate of the center of the top-left pixel in the corrected image. This value corresponds to Ty in the above formulas. SET

(summarize)
Collapse Value

Specifies the Y-coordinate, expressed in the relative world coordinate system.

Collapse M_WORLD_POS_Z +

Inquires the Z-coordinate of gray level 0 in the corrected image. SET

(summarize)
Collapse Value

Specifies the base height of a gray level of 0, expressed in the relative world coordinate system .

You can add the following value to the above-mentioned values to determine the default value of an inquire type, regardless of the current value of the inquire type.

function map For inquiring the default value
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_DEFAULT

Inquires the default value of the specified inquire type.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_DOUBLE

For a fixturing offset object, the InquireType parameter can be set to one of the following values.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_DOUBLE.

function map For a fixturing offset object
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_ANGLE +

Inquires the angular offset to apply to the reference location when setting the relative world coordinate system. SET

(summarize)
Collapse Value

Specifies the angular offset.

Collapse M_POSITION_X +

Inquires the X-offset to apply to the reference location when setting the relative world coordinate system. SET

(summarize)
Collapse Value

Specifies the X-offset.

Collapse M_POSITION_Y +

Inquires the Y-offset to apply to the reference location when setting the relative world coordinate system. SET

(summarize)
Collapse Value

Specifies the Y-offset.

You can add one of the following values to the above-mentioned values to cast the requested information to the required data type.

function map For specifying the data type
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_TYPE_CHAR

Casts the requested information to a char.

(summarize)
Collapse UserVarPtr data type info

Data type: char

Collapse M_TYPE_MIL_DOUBLE

Casts the requested information to a MIL_DOUBLE.

(summarize)
Collapse UserVarPtr data type info
  • Data type: array of type MIL_DOUBLE
    Array size: Depends on the result type.
    Note: When multiple results.

  • Data type: MIL_DOUBLE
    Note: When a single result.

Collapse M_TYPE_MIL_FLOAT

Casts the requested information to a MIL_FLOAT.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_FLOAT

Collapse M_TYPE_MIL_ID

Casts the requested information to a MIL_ID.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_ID

Collapse M_TYPE_MIL_INT

Casts the requested information to a MIL_INT.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_INT

Collapse M_TYPE_MIL_INT16

Casts the requested results to a MIL_INT16.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_INT16

Collapse M_TYPE_MIL_INT32

Casts the requested information to a MIL_INT32.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_INT32

Collapse M_TYPE_MIL_INT64

Casts the requested information to a MIL_INT64.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_INT64

Return value
The returned value is the requested information, cast to a MIL_INT. If the requested information is not a single value, this function will return M_NULL.
Compilation information
Header Include mil.h.
Library Use mil.lib; milcal.lib.
DLL Requires mil.dll; milcal.dll.
PROC CALIBRATION PLANE DEFAULT ABSOLUTE COORDINATE SYSTEM RELATIVE COORDINATE SYSTEM CALIBRATION STATUS CALIBRATED CALIBRATING GRID NOT FOUND INVALID CALIBRATION POINTS MATHEMATICAL EXCEPTION NOT INITIALIZED PLANE ANGLE TOO SMALL TOO MANY OUTLIERS LINK TOOL AND CAMERA DEFAULT DISABLE ENABLE LOCALIZATION NB ITERATIONS MAX DEFAULT LOCALIZATION NB OUTLIERS MAX DEFAULT OWNER SYSTEM DEFAULT HOST RELATIVE ORIGIN ANGLE RELATIVE ORIGIN X RELATIVE ORIGIN Y RELATIVE ORIGIN Z TOOL POSITION X TOOL POSITION Y TOOL POSITION Z DEFAULT TRANSFORM CACHE DISABLE ENABLE COLUMN NUMBER COLUMN SPACING FOREGROUND VALUE DEFAULT FOREGROUND BLACK FOREGROUND WHITE GRID CORNER HINT X DEFAULT NONE GRID CORNER HINT Y DEFAULT NONE GRID ORIGIN X GRID ORIGIN Y GRID ORIGIN Z GRID TYPE CHESSBOARD GRID CIRCLE GRID ROW NUMBER ROW SPACING AVERAGE PIXEL ERROR AVERAGE WORLD ERROR CALIBRATION IMAGE POINTS X CALIBRATION IMAGE POINTS Y CALIBRATION WORLD POINTS X CALIBRATION WORLD POINTS Y CALIBRATION WORLD POINTS Z GLOBAL AVERAGE PIXEL ERROR GLOBAL AVERAGE WORLD ERROR GLOBAL MAXIMUM PIXEL ERROR GLOBAL MAXIMUM WORLD ERROR MAXIMUM PIXEL ERROR MAXIMUM WORLD ERROR NUMBER OF CALIBRATION POINTS NUMBER OF CALIBRATION POSES ASPECT RATIO INVALID SCALE CALIBRATION INPUT DATA GRID LIST PARAMETRIC CCD ASPECT RATIO DISTORTION RADIAL 1 FOCAL LENGTH PRINCIPAL POINT X DEFAULT PRINCIPAL POINT Y DEFAULT ASSOCIATED CALIBRATION NULL DEFAULT UNIFORM CALIBRATION CALIBRATION CATEGORY NULL 2D CALIBRATION 3D CALIBRATION CALIBRATION MODE NULL 3D ROBOTICS LINEAR INTERPOLATION PERSPECTIVE TRANSFORMATION TSAI BASED UNIFORM TRANSFORMATION CONSTANT PIXEL SIZE FALSE TRUE CORRECTION STATE FALSE TRUE DEPTH MAP FALSE TRUE Y AXIS UP FALSE TRUE CALIBRATION CHILD OFFSET X CALIBRATION CHILD OFFSET Y GRAY LEVEL SIZE Z INVALID SCALE PIXEL ROTATION PIXEL SIZE X PIXEL SIZE Y WORLD POS X WORLD POS Y WORLD POS Z DEFAULT ANGLE POSITION X POSITION Y TYPE CHAR TYPE MIL DOUBLE TYPE MIL FLOAT TYPE MIL ID TYPE MIL INT TYPE MIL INT16 TYPE MIL INT32 TYPE MIL INT64 GRID LIST PARAMETRIC TSAI BASED NULL NULL NULL TRUE TRUE