This interface provide functionalities of the rotation center calibration and alignment task. More...
Public Member Functions | |
void | AddRotPoint (double pntX, double pntY, double angle) |
void | AddRotPointPair (double pntX1, double pntY1, double pntX2, double pntY2, double angle) |
void | Align (double pntX1, double pntY1, double pntX2, double pntY2, double *dx, double *dy, double *da) |
void | AlignTo (double pntX1, double pntY1, double pntX2, double pntY2, double aimPointX1, double aimPointY1, double aimPointX2, double aimPointY2, double *dx, double *dy, double *da) |
LPVErrorCode | Calibrate () |
ILPoint * | GetRotCenter () |
BOOL | IsCalibrated () |
void | SetAim (double aimPointX1, double aimPointY1, double aimPointX2, double aimPointY2) |
void | Transform (double pntX, double pntY, double dx, double dy, double da, double *newX, double *newY) |
![]() | |
ILObject * | Copy () |
LPVErrorCode | Load (LString filename) |
void | Reset () |
LPVErrorCode | Save (LString filename) |
BOOL | Valid () |
Properties | |
BOOL | TranslationOnRotation [get, set] |
Whether the translation platform is dependent on the rotation platform. By default, it's off. If yes, then the rotation drives and changes the coordinates of translation platform, affect its translation direction in physical world. . | |
This interface provide functionalities of the rotation center calibration and alignment task.
The rotation calibration is commonly used in a vision system with rotation platform for guiding, grabbing and alignment tasks.
The center is estimated with the rotation points or pairs of points around the center. The rotation calibration is usually done after the hand-eye calibration using N-Points model. Thus, the points here in most use case indicates the world points.
After calibration, you can use the center for aim-object alignment, it report the translation and rotation for align the aim and object point.
To use this interface, you should create a LCalibRotation object.
void AddRotPoint | ( | double | pntX, |
double | pntY, | ||
double | angle | ||
) |
Add a rotation point for calibration. It forms a rotation circular path around the rotation center.
[in] | pntX | The x-coordinate of the rotation point. |
[in] | pntY | The y-coordinate of the rotation point. |
[in] | angle | The rotation angle of the platform, pass in -1 (default) to ignore this value. |
void AddRotPointPair | ( | double | pntX1, |
double | pntY1, | ||
double | pntX2, | ||
double | pntY2, | ||
double | angle | ||
) |
Add a pair of rotation points for calibration. It forms two concentric circular paths around the rotation center.
[in] | pntX1 | The x-coordinate of the 1st rotation point. |
[in] | pntY1 | The y-coordinate of the 1st rotation point. |
[in] | pntX2 | The x-coordinate of the 2nd rotation point. |
[in] | pntY2 | The y-coordinate of the 2nd rotation point. |
[in] | angle | The rotation angle of the platform, pass in -1 (default) to ignore this value. |
void Align | ( | double | pntX1, |
double | pntY1, | ||
double | pntX2, | ||
double | pntY2, | ||
double * | dx, | ||
double * | dy, | ||
double * | da | ||
) |
Align the object to the configured aim position. The mapping works with a calibrated system, if not the outputs are all zeros.
[in] | pntX1 | The x-coordinate of the 1st mark of the object position. |
[in] | pntY1 | The y-coordinate of the 1st mark of the object position. |
[in] | pntX2 | The x-coordinate of the 2nd mark of the object position. |
[in] | pntY2 | The y-coordinate of the 2nd mark of the object position. |
[out] | dx | Return the offset in x coordinate for the platform to align the object to the aim position. |
[out] | dy | Return the offset in y coordinate for the platform to align the object to the aim position. |
[out] | da | Return the rotation for the platform to align the object to the aim position. |
void AlignTo | ( | double | pntX1, |
double | pntY1, | ||
double | pntX2, | ||
double | pntY2, | ||
double | aimPointX1, | ||
double | aimPointY1, | ||
double | aimPointX2, | ||
double | aimPointY2, | ||
double * | dx, | ||
double * | dy, | ||
double * | da | ||
) |
Align the object to the given aim position. The mapping works with a calibrated system, if not the outputs are all zeros.
[in] | aimPointX1 | The x-coordinate of the 1st mark of the aim position. |
[in] | aimPointY1 | The y-coordinate of the 1st mark of the aim position. |
[in] | aimPointX2 | The x-coordinate of the 2nd mark of the aim position. |
[in] | aimPointY2 | The y-coordinate of the 2nd mark of the aim position. |
[in] | pntX1 | The x-coordinate of the 1st mark of the object position. |
[in] | pntY1 | The y-coordinate of the 1st mark of the object position. |
[in] | pntX2 | The x-coordinate of the 2nd mark of the object position. |
[in] | pntY2 | The y-coordinate of the 2nd mark of the object position. |
[out] | dx | Return the offset in x coordinate for the platform to align the object to the aim position. |
[out] | dy | Return the offset in y coordinate for the platform to align the object to the aim position. |
[out] | da | Return the rotation for the platform to align the object to the aim position. |
LPVErrorCode Calibrate | ( | ) |
Do calibration with current configuration and the rotation points added.
error | Return error code if anything is wrong. |
ILPoint* GetRotCenter | ( | ) |
Get the estimated rotation center
BOOL IsCalibrated | ( | ) |
Check whether the calibration object is well-calibrated.
val | Return true if it's calibrated, otherwise, return false. |
void SetAim | ( | double | aimPointX1, |
double | aimPointY1, | ||
double | aimPointX2, | ||
double | aimPointY2 | ||
) |
Set the aligning aim position.
[in] | aimPointX1 | The x-coordinate of the 1st mark of the aim position. |
[in] | aimPointY1 | The y-coordinate of the 1st mark of the aim position. |
[in] | aimPointX2 | The x-coordinate of the 2nd mark of the aim position. |
[in] | aimPointY2 | The y-coordinate of the 2nd mark of the aim position. |
void Transform | ( | double | pntX, |
double | pntY, | ||
double | dx, | ||
double | dy, | ||
double | da, | ||
double * | newX, | ||
double * | newY | ||
) |
Transform the given point
[in] | pntX | The x-coordinate of the point. |
[in] | pntY | The y-coordinate of the point. |
[in] | dx | The offset in x coordinate. |
[in] | dy | The offset in y coordinate. |
[in] | da | The rotation angle. |
[out] | newX | Output the x-coordinate of the transformed point. |
[out] | newY | Output the y-coordinate of the transformed point. |