MIL_ID CalibratedMilObjectId, | //in |
MIL_INT64 TargetCoordinateSystem, | //in |
MIL_INT64 ReferenceCoordinateSystem, | //in |
MIL_INT64 InquireType, | //in |
MIL_ID MatrixId, | //in |
MIL_DOUBLE *Param1Ptr, | //out |
MIL_DOUBLE *Param2Ptr, | //out |
MIL_DOUBLE *Param3Ptr, | //out |
MIL_DOUBLE *Param4Ptr | //out |
This function returns the position and orientation of one coordinate system as a transformation of another coordinate system. For example, you can use this function to inquire about the position of your camera in the absolute coordinate system; essentially, you can inquire about the origin and orientation of the camera coordinate system with respect to the absolute coordinate system. Note that to move a specified (target) coordinate system relative to a reference coordinate system, you can use McalSetCoordinateSystem().
Note that McalGetCoordinateSystem() returns angles in degrees. However, unlike most other MIL functions, this function returns angles following the right-hand grip rule around the axis of rotation; if you wrap your right hand around the axis of rotation, pointing your thumb in the positive direction of the axis, your fingers wrap in the direction of rotation. For example, a positive rotation around the Z-axis corresponds to a rotation that turns the positive X-axis toward the positive Y-axis.
Specifies the identifier of the calibration context, a 3D reconstruction context, a 3D reconstruction result buffer of type M_POINT_CLOUD_CONTAINER, or any object which has calibration information, such as an image or a result buffer.
Specifies which coordinate system to inquire. This parameter must be set to one of the following values:
Note that when CalibratedMilObjectId is set to a 3D reconstruction context, the context must be of type M_CALIBRATED_CAMERA_LINEAR_MOTION and must have already been calibrated using M3dmapCalibrate() or M3dmapCalibrateMultiple(). In this case, TargetCoordinateSystem can only be set to either M_ABSOLUTE_COORDINATE_SYSTEM or M_LASER_LINE_COORDINATE_SYSTEM.
Note that when CalibratedMilObjectId is set to a 3D reconstruction result buffer, the result buffer must be of type M_POINT_CLOUD_CONTAINER. In this case, TargetCoordinateSystem can only be set to either M_ABSOLUTE_COORDINATE_SYSTEM or M_RELATIVE_COORDINATE_SYSTEM.
For specifying the target coordinate
system
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_ABSOLUTE_COORDINATE_SYSTEM |
Specifies an implicit and unmovable coordinate system from which all other coordinate systems are defined. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CAMERA_COORDINATE_SYSTEM |
Specifies the coordinate system whose origin corresponds to the effective pinhole of the camera and whose Z-axis points in the direction that the camera is facing. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_LASER_LINE_COORDINATE_SYSTEM |
Specifies the coordinate system whose origin is on the first laser line at the point closest to the origin of the absolute coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_RELATIVE_COORDINATE_SYSTEM |
Specifies the coordinate system which determines the world plane used when working with world units which can be recentered and/or reoriented using McalSetCoordinateSystem() or McalRelativeOrigin(). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ROBOT_BASE_COORDINATE_SYSTEM |
Specifies the coordinate system whose origin is positioned at the base of the robot holding the camera. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_TOOL_COORDINATE_SYSTEM |
Specifies the coordinate system used to change the position of the camera coordinate system. (more details...) |
Specifies the coordinate system that will be used as a reference for calculations. All returned coordinates or angles will be calculated relative to this coordinate system. This parameter must be set to one of the following values:
Note that when CalibratedMilObjectId is set to a 3D reconstruction context of type M_CALIBRATED_CAMERA_LINEAR_MOTION, the context must be of type M_CALIBRATED_CAMERA_LINEAR_MOTION and must have already been calibrated using M3dmapCalibrate() or M3dmapCalibrateMultiple(). In this case, ReferenceCoordinateSystem can only be set to either M_ABSOLUTE_COORDINATE_SYSTEM or M_LASER_LINE_COORDINATE_SYSTEM.
Note that when CalibratedMilObjectId is set to a 3D reconstruction result buffer, the result buffer must be of type M_POINT_CLOUD_CONTAINER. In this case, ReferenceCoordinateSystem can only be set to either M_ABSOLUTE_COORDINATE_SYSTEM or M_RELATIVE_COORDINATE_SYSTEM.
For specifying the reference coordinate
system
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_ABSOLUTE_COORDINATE_SYSTEM. |
||||||||||||||||||||||||||||||||||||||
M_ABSOLUTE_COORDINATE_SYSTEM |
Specifies an implicit and unmovable coordinate system from which all other world coordinate systems are defined. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CAMERA_COORDINATE_SYSTEM |
Specifies the coordinate system whose origin corresponds to the effective pinhole of the camera and whose Z-axis points in the direction that the camera is facing. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_LASER_LINE_COORDINATE_SYSTEM |
Specifies the coordinate system whose origin is on the first laser line at the point closest to the origin of the absolute coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_RELATIVE_COORDINATE_SYSTEM |
Specifies the coordinate system used when working in world units, which can be recentered and/or reoriented using McalSetCoordinateSystem() or McalRelativeOrigin(). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ROBOT_BASE_COORDINATE_SYSTEM |
Specifies the coordinate system whose origin is positioned at the base of the robot holding the camera. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_TOOL_COORDINATE_SYSTEM |
Specifies the coordinate system used to change the position of the camera coordinate system. (more details...) |
Specifies the type of transformation to use to return the location of the target coordinate system with respect to the reference coordinate system.
Any parameters for which a value is not returned (MatrixId, and Param1Ptr to Param4Ptr) must be set to M_NULL.
See the Parameter associations section for possible values that can be specified.
Specifies the matrix representation of a transformation, in an array buffer. The buffer must be a 32-bit float buffer, allocated using MbufAlloc2d() with M_ARRAY. The required buffer size will depend on the results being returned.
If this parameter is not used, it must be set to M_NULL.
See the Parameter associations section for possible values that can be specified.
Specifies the address in which to return information about the transformation required to cause the reference coordinate system to overlap or align with the target coordinate system, depending on which is requested.
If this parameter is not used, it must be set to M_NULL.
See the Parameter associations section for possible values that can be returned.
Specifies the address in which to return information about the transformation required to cause the reference coordinate system to overlap or align with the target coordinate system, depending on which is requested.
If this parameter is not used, it must be set to M_NULL.
See the Parameter associations section for possible values that can be returned.
Specifies the address in which to return information about the transformation required to cause the reference coordinate system to overlap or align with the target coordinate system, depending on which is requested.
If this parameter is not used, it must be set to M_NULL.
See the Parameter associations section for possible values that can be returned.
Specifies the address in which to return information about the transformation required to cause the reference coordinate system to overlap or align with the target coordinate system, depending on which is requested.
If this parameter is not used, it must be set to M_NULL.
See the Parameter associations section for possible values that can be returned.
The table below lists possible values for the InquireType and MatrixId parameters and possible values returned to the Param1Ptr, Param2Ptr, Param3Ptr, and Param4Ptr parameters.
For inquiring about the transformation
parameters
|
|||||||||||||||||||||||||||||||||||||||
InquireType |
Description
|
||||||||||||||||||||||||||||||||||||||
MatrixId | |||||||||||||||||||||||||||||||||||||||
Param1Ptr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
Param2Ptr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
Param3Ptr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
Param4Ptr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_HOMOGENEOUS_MATRIX |
Retrieves the transformation which makes the axes of the reference coordinate system parallel to those of the target coordinate system, and makes the origin of the reference coordinate system coincide with that of the target coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
MatrixId |
Returns the matrix representation of the transformation which causes the reference coordinate system to overlap with the target coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ROTATION_AXIS_ANGLE |
Retrieves the axis and angle of rotation which makes the axes of the reference coordinate system parallel to those of the target coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the X-coordinate of one of the points which defines the axis of rotation. |
||||||||||||||||||||||||||||||||||||||
Param2Ptr |
Returns the Y-coordinate of one of the points which defines the axis of rotation. |
||||||||||||||||||||||||||||||||||||||
Param3Ptr |
Returns the Z-coordinate of one of the points which defines the axis of rotation. |
||||||||||||||||||||||||||||||||||||||
Param4Ptr |
Returns the angle of the rotation around the axis of rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0 <= Value < 360 |
Specifies the rotation angle, in degrees. |
||||||||||||||||||||||||||||||||||||||
M_ROTATION_MATRIX |
Retrieves the rotation matrix that makes the axes of the reference coordinate system parallel to those of the target coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
MatrixId |
Returns the matrix representation of the rotation which brings the axes of the reference coordinate system parallel to those of the target coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ROTATION_QUATERNION |
Retrieves the components of the quaternion that defines the rotation which makes the axes of the reference coordinate system parallel to those of the target coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the scalar component of the quaternion. |
||||||||||||||||||||||||||||||||||||||
Param2Ptr |
Returns the X-component of the quaternion. |
||||||||||||||||||||||||||||||||||||||
Param3Ptr |
Returns the Y-component of the quaternion. |
||||||||||||||||||||||||||||||||||||||
Param4Ptr |
Returns the Z-component of the quaternion. |
||||||||||||||||||||||||||||||||||||||
M_ROTATION_XYZ |
Retrieves the angles of the three rotations that make the axes of the reference coordinate system parallel to those of the target coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the X-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value < 360.0 |
Specifies the X-axis rotation, in degrees. |
||||||||||||||||||||||||||||||||||||||
Param2Ptr |
Returns the Y-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value <= 90.0 |
Specifies the Y-axis rotation, in degrees, when located between the positive Z-axis and the positive X-axis. |
||||||||||||||||||||||||||||||||||||||
270.0 <= Value < 360.0 |
Specifies the Y-axis rotation, in degrees, when located between the positive Z-axis and the negative X-axis. |
||||||||||||||||||||||||||||||||||||||
Param3Ptr |
Returns the Z-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value < 360.0 |
Specifies the Z-axis rotation, in degrees. |
||||||||||||||||||||||||||||||||||||||
M_ROTATION_XZY |
Retrieves the angles of the three rotations that make the axes of the reference coordinate system parallel to those of the target coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the X-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value < 360.0 |
Specifies the X-axis rotation, in degrees. |
||||||||||||||||||||||||||||||||||||||
Param2Ptr |
Returns the Z-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value <= 90.0 |
Specifies the Z-axis rotation, in degrees, when located between the positive X-axis and the positive Y-axis. |
||||||||||||||||||||||||||||||||||||||
270.0 <= Value < 360.0 |
Specifies the Z-axis rotation, in degrees, when located between the positive X-axis and the negative Y-axis. |
||||||||||||||||||||||||||||||||||||||
Param3Ptr |
Returns the Y-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value < 360.0 |
Specifies the Y-axis rotation, in degrees. |
||||||||||||||||||||||||||||||||||||||
M_ROTATION_YXZ |
Retrieves the angles of the three rotations that make the axes of the reference coordinate system parallel to those of the target coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the Y-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value < 360.0 |
Specifies the Y-axis rotation, in degrees. |
||||||||||||||||||||||||||||||||||||||
Param2Ptr |
Returns the X-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value <= 90.0 |
Specifies the X-axis rotation, in degrees, when located between the positive Y-axis and the positive Z-axis. |
||||||||||||||||||||||||||||||||||||||
270.0 <= Value < 360.0 |
Specifies the X-axis rotation, in degrees, when located between the positive Y-axis and the negative Z-axis. |
||||||||||||||||||||||||||||||||||||||
Param3Ptr |
Returns the Z-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value < 360.0 |
Specifies the Z-axis rotation, in degrees. |
||||||||||||||||||||||||||||||||||||||
M_ROTATION_YZX |
Retrieves the angles of the three rotations that make the axes of the reference coordinate system parallel to those of the target coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the Y-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value < 360.0 |
Specifies the Y-axis rotation, in degrees. |
||||||||||||||||||||||||||||||||||||||
Param2Ptr |
Returns the Z-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value <= 90.0 |
Specifies the Z-axis rotation, in degrees, when located between the positive X-axis and the positive Y-axis. |
||||||||||||||||||||||||||||||||||||||
270.0 <= Value < 360.0 |
Specifies the Z-axis rotation, in degrees, when located between the positive X-axis and the negative Y-axis. |
||||||||||||||||||||||||||||||||||||||
Param3Ptr |
Returns the X-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value < 360.0 |
Specifies the X-axis rotation, in degrees. |
||||||||||||||||||||||||||||||||||||||
M_ROTATION_ZXY |
Retrieves the angles of the three rotations that make the axes of the reference coordinate system parallel to those of the target coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the Z-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value < 360.0 |
Specifies the Z-axis rotation, in degrees. |
||||||||||||||||||||||||||||||||||||||
Param2Ptr |
Returns the X-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value <= 90.0 |
Specifies the X-axis rotation, in degrees, when located between the positive Y-axis and the positive Z-axis. |
||||||||||||||||||||||||||||||||||||||
270.0 <= Value < 360.0 |
Specifies the X-axis rotation, in degrees, when located between the positive Y-axis and the negative Z-axis. |
||||||||||||||||||||||||||||||||||||||
Param3Ptr |
Returns the Y-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value < 360.0 |
Specifies the Y-axis rotation, in degrees. |
||||||||||||||||||||||||||||||||||||||
M_ROTATION_ZYX |
Retrieves the angles of the three rotations that make the axes of the reference coordinate system parallel to those of the target coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the Z-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value < 360.0 |
Specifies the Z-axis rotation, in degrees. |
||||||||||||||||||||||||||||||||||||||
Param2Ptr |
Returns the Y-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value <= 90.0 |
Specifies the Y-axis rotation, in degrees, when located between the positive Z-axis and the positive X-axis. |
||||||||||||||||||||||||||||||||||||||
270.0 <= Value < 360.0 |
Specifies the Y-axis rotation, in degrees, when located between the positive Z-axis and the negative X-axis. |
||||||||||||||||||||||||||||||||||||||
Param3Ptr |
Returns the X-axis rotation. (more details...) |
||||||||||||||||||||||||||||||||||||||
0.0 <= Value < 360.0 |
Specifies the X-axis rotation, in degrees. |
||||||||||||||||||||||||||||||||||||||
M_TRANSLATION |
Retrieves the components of the translation vector that makes the origin of the reference coordinate system coincide with the origin of the target coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1Ptr |
Returns the displacement along the X-axis of the reference coordinate system. |
||||||||||||||||||||||||||||||||||||||
Param2Ptr |
Returns the displacement along the Y-axis of the reference coordinate system. |
||||||||||||||||||||||||||||||||||||||
Param3Ptr |
Returns the displacement along the Z-axis of the reference coordinate system. |
Header | Include mil.h. |
Library | Use mil.lib; milcal.lib. |
DLL | Requires mil.dll; milcal.dll. |