CogHandEyeCalibrator Execute Method (CogFeatureCrspsMCamerasNPoses,  Rectangle ,  CogTransform2DRigid )Cognex VisionPro 9.8 SR1
Compute the CogHandEyeCalibrationResults for the supplied corresponded point pairs, pelrects, and UncorrectedHome2DFromStage2D poses, using the current parameter settings.

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

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

Parameters

correspondedPointPairs
Type: Cognex.VisionPro CogFeatureCrspsMCamerasNPoses
The corresponded point pairs to be processed.
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.

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.
CogTimeoutExpiredException If TimeoutEnabled is true and this method does not complete within Timeout milliseconds.
ArgumentException If any of the following is true:
  • 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.
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 correspondedPointParams argument falls outside its corresponding pelrect.
ArgumentException If the input data is degenerate.
Remarks

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 features in the input correspondences from each camera 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. The graph below shows the difference between the two different calibration methods.

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







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

                   ____________________________________________________
                  /               Motion Stage                        /|
                 /    _______________________________________        / | 
                /    /                                      /|      /  |
               /    /   *    *    *    *    *    *    *    / /     /   |
              /    /                                      / /     /    |
             /    /   *    *    *    *    *    *    *    / /     /
            /    /                                      / /     /
           /    /   *    *    *    *    *    *    *    / /     /
          /    /       Big calibration plate          / /     /
         /    /   *    *    *    *    *    *    *    / /     /
        /    /                                      / /     /
       /    /   *    *    *    *    *    *    *    / /     /
      /    /                                      / /     /
     /    /    *    *    *    *    *    *    *   / /     /
    /    /______________________________________/ /     /
   /     |______________________________________|/     /
  /                                                   /
 /___________________________________________________/     
 |                                                   | 
 |                                                   |
Regular big calibration plate based hand-eye calibration
-----------------------------------------------------------------------------


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





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

                   ____________________________________________________
                  /                                                   /|
                 /   __________                     __________       / |                                             
                /   /         /|                   /         /|     /  |
               /   /  *   *  / /                  /  *   *  / /    /   |    
              /   /  *   *  / /                  /  *   *  / /    /    |           
             /   /_________/ /                  /_________/ /    /       
            /    |_________|/                   |_________|/    /
           /     calibration plate 1     calibration plate 2   /
          /                                                   /
         /                   Motion Stage                    /      
        /   __________                     __________       /
       /   /         /|                   /         /|     /
      /   /  *   *  / /                  /  *   *  / /    /  
     /   /  *   *  / /                  /  *   *  / /    /
    /   /_________/ /                  /_________/ /    /  
   /    |_________|/                   |_________|/    /    
  /     calibration plate 3     calibration plate 4   /
 /___________________________________________________/
 |                                                   |
 |                                                   |
Separate calibration plate based hand-eye calibration

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.

See Also