CogHandEyeCalibrator Execute Method (CogFeaturePositionsMCamerasNPoses,  Rectangle ,  CogTransform2DRigid )Cognex VisionPro 9.8
Compute the CogHandEyeCalibrationResults for the supplied trackedRaw2DFeatures, pelrects, and UncorrectedHome2DFromStage2D poses, using the current parameter settings.

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

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

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.

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.
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.
Remarks

This method handles the usage case where a run time part are used instead of a calibration plate. Which means the input parameter will not have point pairs that have both physical feature location and Raw2D point locations. The usage case is illustrated as the graph below.

                     ___                                ___
                    |   | Camera 1                     |   | Camera 2
                    |___|                              |___|
                     /_\                                /_





           ___                                ___
          |   | Camera 3                     |   | Camera 4
          |___|                              |___|
           /_\                                /_

                   ____________________________________________________
                  /                                                   /|
                 /   _________                     _______           / |                                             
                /   /         \   Motion Stage    /       \         /  |
               /   /     *     \                 /  *      |       /   |  
              /   /   *        /________________/       *  |      /    |         
             /   |\___                                ____/|     /        
            /     \__/                               /____/     /     
           /        /        Runtime part           //         /
          /        /     (Calibration Object)      //         / 
         /        /                               //         /        
        /   _____/                               //___      /
       /   /             _____________        *       \    /  
      /   /     *       /_____________\               /|  /
     /   /   *      *  //             \\    *     *  //  /
    /   |\____________//               \\___________//  /
   /     \____________/                 \___________/  / 
  /                                                   /  
 /___________________________________________________/
 |                                                   |
 |                                                   |
Tracked Raw2D feature based hand-eye calibration

See Also