Recompute the CogHandEyeCalibrationResults for the supplied
trackedRaw2DFeatures, pelrects, and UncorrectedHome2DFromStage2D poses,
reusing intrinsics parameter from the input raw2DFromCamera2Ds
and recompute the extrinsic parameter.
Namespace: Cognex.VisionPro.CalibFixAssembly: Cognex.VisionPro.CalibFixPlus (in Cognex.VisionPro.CalibFixPlus.dll) Version: 75.1.0.0
public CogHandEyeCalibrationResults Execute(
CogFeaturePositionsMCamerasNPoses trackedRaw2DFeatures,
Rectangle[] pelRects,
CogTransform2DRigid[] uncorrectedHome2DFromStage2Ds,
CogTransform2DCameraCalibration[] raw2DFromCamera2Ds
)
public CogHandEyeCalibrationResults Execute(
CogFeaturePositionsMCamerasNPoses trackedRaw2DFeatures,
Rectangle[] pelRects,
CogTransform2DRigid[] uncorrectedHome2DFromStage2Ds,
CogTransform2DCameraCalibration[] raw2DFromCamera2Ds
)
Public Function Execute (
trackedRaw2DFeatures As CogFeaturePositionsMCamerasNPoses,
pelRects As Rectangle(),
uncorrectedHome2DFromStage2Ds As CogTransform2DRigid(),
raw2DFromCamera2Ds As CogTransform2DCameraCalibration()
) As CogHandEyeCalibrationResults
Public Function Execute (
trackedRaw2DFeatures As CogFeaturePositionsMCamerasNPoses,
pelRects As Rectangle(),
uncorrectedHome2DFromStage2Ds As CogTransform2DRigid(),
raw2DFromCamera2Ds As CogTransform2DCameraCalibration()
) As CogHandEyeCalibrationResults
public:
CogHandEyeCalibrationResults^ Execute(
CogFeaturePositionsMCamerasNPoses^ trackedRaw2DFeatures,
array<Rectangle>^ pelRects,
array<CogTransform2DRigid^>^ uncorrectedHome2DFromStage2Ds,
array<CogTransform2DCameraCalibration^>^ raw2DFromCamera2Ds
)
public:
CogHandEyeCalibrationResults^ Execute(
CogFeaturePositionsMCamerasNPoses^ trackedRaw2DFeatures,
array<Rectangle>^ pelRects,
array<CogTransform2DRigid^>^ uncorrectedHome2DFromStage2Ds,
array<CogTransform2DCameraCalibration^>^ raw2DFromCamera2Ds
)
Parameters
- trackedRaw2DFeatures
- Type: Cognex.VisionPro CogFeaturePositionsMCamerasNPoses
Tracked Raw2D feature position points. Each feature includes x,y coordinate and a validation value.
For different poseID: i, trackedRaw2DFeatures[i][cameraID][featureID] should always correspond to the
same physical feature. The validation value indicates whether this feature is visible in current
camera under current pose.
- pelRects
- Type: System.Drawing Rectangle
The pelrects of the cameras. There
should be one pelrect for each camera. The input pelRects
specifies the pelrect of each camera. There is no relationship
between the pelrects of two separate cameras. It is used to define
the origin of camera coordinate system (i.e. Camera2D) which is at
the center of the pelrect.
- uncorrectedHome2DFromStage2Ds
- Type: Cognex.VisionPro CogTransform2DRigid
The sequence of UncorrectedHome2DFromStage2D poses that were used
to move the stage when the images that provided the tracked Raw2D
features were acquired.
- raw2DFromCamera2Ds
- Type: Cognex.VisionPro CogTransform2DCameraCalibration
The previously computed calibration results which is expected to have
better accuracy (e.g., using calibration plate). The intrinsic parameters of
input camera calibrations are kept during computing the hand-eye calibration,
while the extrinsic parameter are recalculated based on the tracked Raw2D features.
Return Value
Type:
CogHandEyeCalibrationResults
A CogHandEyeCalibrationResults containing the results of the
analysis, i.e. a CogHandEyeCalibrationResult object for each camera.
| Exception | Condition |
|---|
| ArgumentNullException |
If the trackedRaw2DFeatures argument is null.
|
| ArgumentNullException |
If the pelRects argument is null.
|
| ArgumentNullException |
If the uncorrectedHome2DFromStage2Ds argument is null.
|
| ArgumentNullException |
If the raw2DFromCamera2Ds argument is null.
|
| CogTimeoutExpiredException |
If TimeoutEnabled is true and this method does not complete
within Timeout milliseconds.
|
| ArgumentException |
If any of the following is true:
-
Any of the input arguments is empty.
-
trackedRaw2DFeatures.Count != uncorrectedHome2DFromStage2Ds.Count
-
trackedRaw2DFeatures[i].Count != pelRects.Count for any pose i
-
trackedRaw2DFeatures[i1][j].Count != trackedRaw2DFeatures[i2][j] for any j.
-
Home2DUnitLengthReference != UseMotionStage
-
Inconsistent handedness flip identified in different poses
for the same camera.
|
| ArgumentException |
If MotionCapability is RotationAndTranslation2Axes and any of the
following is true:
-
The uncorrectedHome2DFromStage2Ds parameter has fewer than 4 elements.
-
The translation component of all elements of
uncorrectedHome2DFromStage2Ds are roughly collinear.
Note: the elements of uncorrectedHome2DFromStage2Ds are
said to be roughly collinear if, when projecting these
translation components to any pair of perpendicular axes, the
shortest projection span is less than 10% of the longest
projection span.
-
The rotation span among all elements of uncorrectedHome2DFromStage2Ds
is less than MinimumRotationSpan.
|
| ArgumentException |
If MotionCapability is RotationAndTranslation1Axis and any of the
following is true:
-
The uncorrectedHome2DFromStage2Ds parameter has fewer than 3 elements.
-
All elements of the uncorrectedHome2DFromStage2Ds parameter
have exactly the same translation component.
-
The rotation span among all elements of uncorrectedHome2DFromStage2Ds
is less than MinimumRotationSpan.
|
| ArgumentException |
If MotionCapability is RotationOnly and any of the following is true:
-
The uncorrectedHome2DFromStage2Ds parameter has fewer than 2 elements.
-
The rotation span among all elements of uncorrectedHome2DFromStage2Ds
is less than MinimumRotationSpan.
-
There are two elements of uncorrectedHome2DFromStage2Ds with
different translation components.
|
| ArgumentException |
If MotionCapability is TranslationOnly1Axis and any of the
following is true:
-
The uncorrectedHome2DFromStage2Ds parameter has fewer than 2 elements.
-
All elements of uncorrectedHome2DFromStage2Ds have exactly the
same translation component.
-
There are two elements of uncorrectedHome2DFromStage2Ds with
different rotation angles.
|
| ArgumentException |
If MotionCapability is TranslationOnly2Axes and any of the
following is true:
-
The uncorrectedHome2DFromStage2Ds parameter has fewer than 3 elements.
-
The translation component of all elements of
uncorrectedHome2DFromStage2Ds are roughly collinear.
Note: the elements of uncorrectedHome2DFromStage2Ds are
said to be roughly collinear if, when projecting these
translation components to any pair of perpendicular axes, the
shortest projection span is less than 10% of the longest
projection span.
-
There are two elements of uncorrectedHome2DFromStage2Ds with
different rotation angles.
|
| ArgumentException |
If any Raw2D feature point in the trackedRaw2DFeatures
argument falls outside its corresponding pelrect.
|
| ArgumentException |
If the input data is degenerate.
|
| ArgumentException |
If any of the following is true:
-
The Raw2DFromCamera2D transform for any of the items
in raw2DFromCamera2Ds is null.
-
The number of cameras represented by the raw2DFromCamera2Ds
argument does not match the number of items in the
pelRects argument.
-
If the supplied raw2DFromCamera2Ds is using a lens
distortion model different from the one set in the calibrator.
|
The purpose of this overload is to support calibrating cameras whose
mounting positions have been changed since previous calibration,
using potentially sparse feature correspondences.
Requires:
-
Between the previous and current calibration, there should be no
change to the cameras' intrinsic parameters, e.g. focal length,
focus, aperture, lens unit, camera body.
-
Between the previous and current calibration, there could be some
changes to the cameras' extrinsic parameters in-plane rotation
and translation, there might also be some changes in perspective.