CogHandEyeCalibrator Execute Method (CogFeatureCrspsMCamerasNPoses,  Rectangle ,  CogTransform2DRigid , CogHandEyeCalibrationResults)Cognex VisionPro
Recompute the CogHandEyeCalibrationResults for the supplied corresponded point pairs, pelrects, and UncorrectedHome2DFromStage2D poses, reusing each camera's Raw2DFromCamera2D from the input CogHandEyeCalibrationResults.

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

public CogHandEyeCalibrationResults Execute(
	CogFeatureCrspsMCamerasNPoses correspondedPointPairs,
	Rectangle[] pelRects,
	CogTransform2DRigid[] uncorrectedHome2DFromStage2Ds,
	CogHandEyeCalibrationResults previousCameraCalibrations
)

Parameters

correspondedPointPairs
Type: Cognex.VisionPro CogFeatureCrspsMCamerasNPoses
The corresponded point pairs to be processed. The correspondedPointPairs may be as sparse as a single feature point correspondence per camera per view.
pelRects
Type:  System.Drawing Rectangle 
The pelrects used to extract the corresponded point pairs. 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 corresponded point pairs were acquired.
previousCameraCalibrations
Type: Cognex.VisionPro.CalibFix CogHandEyeCalibrationResults
The previously computed calibration results which is expected to have better accuracy. If SeparateCalPlate is false, these input camera calibrations are used without modification in computing the complete hand-eye calibration, and are directly deep-copied into the result set as the raw2DFromCamera2D for the corresponding cameras. In other words, the input correspondences will NOT affect the final result's raw2DFromCamera2D. If SeparateCalPlate is true, only the intrinsic parameters of input camera calibrations are kept during computing the hand-eye calibration, while the extrinsic parameter are recalculated based on the corresponded point pairs.

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 correspondedPointPairs 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.
  • The number of poses in correspondedPointPairs is different from the number of items in uncorrectedHome2DFromStage2Ds.
  • The number of cameras in correspondedPointPairs is different from the number of items in pelRects.
  • The number of cameras in correspondedPointPairs is inconsistent in different poses.
  • The handedness flip between camera and plate is inconsistent in different poses.
NotSupportedException If SeparateCalPlate value is true and 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 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 correspondedPointParams 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 the 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.

This method handles 2 different usage cases depending on the value of SeparateCalPlate, if SeparateCalPlate is true, the algorithm assumes that there is a different calibration plate under each camera. The physical location of the feature in the input correspondences are in different Plate2D spaces. If SeparateCalPlate is false, then it means all the camera are looking at the same calibration plate, the physical locations of all the features are defined in an unified Plate2D space. Currently only MotionCapability RotationAndTranslation is supported for separate cal plate hand-eye calibration. If SeparateCalPlate is false, The current value of MotionCapability will affect the result returned by this method:

  • If the MotionCapability is RotationOnly, the operator cannot recover the orientation of the plate placement pose, so it arbitrarily defines the orientation of the Home2D coordinate space to be the same as the Plate2D coordinate space orientation.
  • Similarly for TranslationOnly1Axis or TranslationOnly2Axes, the operator cannot recover the center of rotation of the plate placement pose, so it will arbitrarily define the origin of the Home2D coordinate system to be the same as the Plate2D origin.

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, the cameras' extrinsic parameters changes such as in-plane rotation and translation, are to be expected. Small changes to non-in-plane rotation and translation that cause changes in perspective are also allowed.

See Also