MIL_ID CalibrationOrImageId, | //in |
MIL_DOUBLE XOffset, | //in |
MIL_DOUBLE YOffset, | //in |
MIL_DOUBLE ZOffset, | //in |
MIL_DOUBLE AngularOffset, | //in |
MIL_INT64 ControlFlag | //in |
This function changes the origin and/or orientation of the relative coordinate system of a calibration context or a calibrated image. If you specify a calibration context, the new location of the relative coordinate system will be taken into account in images associated with the calibration context after the function call, but images previously associated with the calibration context will not be affected. After the function call, you can reference all images with the new relative coordinate system in world units with respect to the new origin.
Moving the relative coordinate system of an image is useful for analyzing an object with respect to a temporary local coordinate system. The relative coordinate system is moved with respect to the specified reference coordinate system. The reference coordinate system can be the absolute coordinate system (M_ASSIGN) or the current location of relative coordinate system (M_COMPOSE_WITH_CURRENT); when it is the absolute coordinate system, the relative coordinate system is re-initialized to the location and orientation of the absolute coordinate system before applying the specified transformation. You can also use McalFixture() to move the relative coordinate system to the location of a specified occurrence of a MIL Pattern Matching or Model Finder model.
If you specify both a rotation and a translation of the relative coordinate system, the rotation is done first.
Note that when the reference coordinate system is the absolute coordinate system, setting the XOffset, YOffset, ZOffset, and AngularOffset parameters to 0 has the effect of resetting the relative coordinate system to that of the absolute coordinate system.
To manipulate the relative coordinate system of a 3D-based calibration context (M_TSAI_BASED or M_3D_ROBOTICS), it is recommended to use McalSetCoordinateSystem() instead of McalRelativeOrigin() since the former supports more transformation types.
If you adjust the relative 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.
Specifies the X-offset of the relative coordinate system origin from the reference coordinate system, in world-units.
Specifies the Y-offset of the relative coordinate system origin from the reference coordinate system, in world-units.
Specifies the Z-offset of the relative coordinate system origin from the reference coordinate system, in world-units.
For 2D-based calibration contexts, this parameter must be set to M_NULL.
Specifies the angle, in degrees, at which to rotate the relative coordinate system around the Z-axis of the reference coordinate system. A positive angle will rotate the relative coordinate system in the direction from the positive X-axis to the negative Y-axis of the reference coordinate system.
Specifies how to apply the transformation. This establishes the reference coordinate system. This parameter can be set to one of the following values:
For specifying the reference coordinate
system
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_ASSIGN. |
||||||||||||||||||||||||||||||||||||||
M_ASSIGN |
Specifies to assign the specified transformation to the relative coordinate system from the origin and orientation of the absolute coordinate system. |
||||||||||||||||||||||||||||||||||||||
M_COMPOSE_WITH_CURRENT |
Specifies to compose the specified transformation with the current position and orientation of the relative coordinate system. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milcal.lib. |
DLL | Requires mil.dll; milcal.dll. |