CogHandEyeCalibrator Execute Method (CogFeaturePositionsMCamerasNPoses,  Rectangle ,  CogTransform2DRigid , CogHandEyeCalibrationResults)Cognex VisionPro
Recompute the CogHandEyeCalibrationResults for the supplied trackedRaw2DFeatures, pelrects, and UncorrectedHome2DFromStage2D poses, reusing intrinsics parameter from the input CogHandEyeCalibrationResults and recompute the extrinsic parameter.

Namespace: Cognex.VisionPro.CalibFix
Assembly: Cognex.VisionPro.CalibFixPlus (in Cognex.VisionPro.CalibFixPlus.dll) Version: 65.1.0.0
Syntax

public CogHandEyeCalibrationResults Execute(
	CogFeaturePositionsMCamerasNPoses trackedRaw2DFeatures,
	Rectangle[] pelRects,
	CogTransform2DRigid[] uncorrectedHome2DFromStage2Ds,
	CogHandEyeCalibrationResults previousCameraCalibrations
)

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.
previousCameraCalibrations
Type: Cognex.VisionPro.CalibFix CogHandEyeCalibrationResults
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.
Exceptions

ExceptionCondition
ArgumentNullException If the trackedRaw2DFeatures argument is null.
ArgumentNullException If the pelRects argument is null.
ArgumentNullException If the uncorrectedHome2DFromStage2Ds argument is null.
ArgumentNullException If the previousCameraCalibrations 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.
NotSupportedException If MotionCapability is Not RotationAndTranslation.
ArgumentException If MotionCapability is RotationAndTranslation and any of the following is true:
  • The uncorrectedHome2DFromStage2Ds parameter has fewer than 4 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 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 previousCameraCalibrations is null.
  • The number of cameras represented by the previousCameraCalibrations argument does not match the number of items in the pelRects argument.
  • If the supplied previousCameraCalibrations is using a lens distortion model different from the one set in this calibrator.
Remarks

The purpose of this overload is to support calibrating cameras whose mounting positions have been changed since previous calibration, using potentially sparse feature correspondences.

Currently, The only MotionCapability MotionCapability supported is RotationAndTranslation. Any other MotionCapability value will cause exception.

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.

See Also