CogHandEyeCalibrator ClassCognex VisionPro 9.8
The CogHandEyeCalibrator class performs a hand-eye calibration between one or more cameras and a motion stage.
Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro.Implementation CogSerializableObjectBase
        Cognex.VisionPro.Implementation CogSerializableChangedEventBase
          Cognex.VisionPro.CalibFix CogHandEyeCalibrator

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

[SerializableAttribute]
public class CogHandEyeCalibrator : CogSerializableChangedEventBase, 
	IDisposable

The CogHandEyeCalibrator type exposes the following members.

Constructors

  NameDescription
Public methodCogHandEyeCalibrator 
This constructor creates a default CogHandEyeCalibrator object.
Public methodCogHandEyeCalibrator(CogHandEyeCalibrator)
Copy constructs a CogHandEyeCalibrator object.
Protected methodCogHandEyeCalibrator(SerializationInfo, StreamingContext)
Serialization construct a CogHandEyeCalibrator object.
Top
Methods

  NameDescription
Public methodStatic memberComputeRaw2DFromCamera2D
Compute camera calibration ( Raw2DFromCamera2D) for a camera using a group of calibration feature correspondences from different calibration plate poses.
Public methodStatic memberComputeRaw2DFromCamera2Ds
Compute camera calibration (Raw2DFromCamera2D) for all cameras using a group of calibration feature correspondences from different calibration plate poses.
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodDispose 
Destruct this CogHandEyeCalibrator.
Protected methodDispose(Boolean)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExecute(CogFeatureCrspsMCamerasNPoses,  Rectangle ,  CogTransform2DRigid )
Compute the CogHandEyeCalibrationResults for the supplied corresponded point pairs, pelrects, and UncorrectedHome2DFromStage2D poses, using the current parameter settings.
Public methodExecute(CogFeaturePositionsMCamerasNPoses,  Rectangle ,  CogTransform2DRigid )
Compute the CogHandEyeCalibrationResults for the supplied trackedRaw2DFeatures, pelrects, and UncorrectedHome2DFromStage2D poses, using the current parameter settings.
Public methodExecute(CogFeatureCrspsMCamerasNPoses,  Rectangle ,  CogTransform2DRigid , CogHandEyeCalibrationResults)
Recompute the CogHandEyeCalibrationResults for the supplied corresponded point pairs, pelrects, and UncorrectedHome2DFromStage2D poses, reusing each camera's Raw2DFromCamera2D from the input CogHandEyeCalibrationResults.
Public methodExecute(CogFeatureCrspsMCamerasNPoses,  Rectangle ,  CogTransform2DRigid ,  CogTransform2DCameraCalibration )
Recompute the CogHandEyeCalibrationResults for the supplied corresponded point pairs, pelrects, and UncorrectedHome2DFromStage2D poses, reusing each camera's intrinsics parameters from the input raw2DFromCamera2Ds and recomputing the extrinsic parameter.
Public methodExecute(CogFeaturePositionsMCamerasNPoses,  Rectangle ,  CogTransform2DRigid , CogHandEyeCalibrationResults)
Recompute the CogHandEyeCalibrationResults for the supplied trackedRaw2DFeatures, pelrects, and UncorrectedHome2DFromStage2D poses, reusing intrinsics parameter from the input CogHandEyeCalibrationResults and recompute the extrinsic parameter.
Public methodExecute(CogFeaturePositionsMCamerasNPoses,  Rectangle ,  CogTransform2DRigid ,  CogTransform2DCameraCalibration )
Recompute the CogHandEyeCalibrationResults for the supplied trackedRaw2DFeatures, pelrects, and UncorrectedHome2DFromStage2D poses, reusing intrinsics parameter from the input raw2DFromCamera2Ds and recompute the extrinsic parameter.
Protected methodFinalize
Finalize this CogHandEyeCalibrator.
(Overrides Object Finalize .)
Protected methodGetAttributes
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetClassName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetComponentName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetConverter
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultEvent
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultProperty
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEditor
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodGetObjectData
Implements the GetObjectData method of the ISerializable interface.
(Inherited from CogSerializableObjectBase.)
Protected methodGetProperties 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetProperties( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetPropertyOwner
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodMemberwiseClone 
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Protected methodOnChanged(Int64)
This method should be called internally whenever the object's state may have changed.
(Inherited from CogSerializableChangedEventBase.)
Protected methodOnChanged(CogChangedEventArgs)
This method may be called internally whenever a derived object's state may have changed and the derived object expresses this change via a derived CogChangedEventArgs class.
(Inherited from CogSerializableChangedEventBase.)
Public methodResumeAndRaiseChangedEvent
Re-enables raising of the Changed event after SuspendChangedEvent has been called, and raises the Changed event if the ChangedEventSuspended count is reduced to zero and any changes were made while events were suspended. Must be called once for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.)
Public methodSuspendChangedEvent
Temporarily suspends the raising of the Changed event. May be called more than once, and a corresponding call to ResumeAndRaiseChangedEvent must be made for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Fields

  NameDescription
Public fieldStatic memberSfDistortionModel
This bit will be set in the EventArgs of a Changed event every time the value returned by DistortionModel may have been changed.
Public fieldStatic memberSfEstimateMotionYAxis
This bit will be set in the EventArgs of a Changed event every time the value returned by EstimateMotionYAxis may have been changed.
Public fieldStatic memberSfHome2DUnitLengthReference
This bit will be set in the EventArgs of a Changed event every time the value returned by Home2DUnitLengthReference may have been changed.
Public fieldStatic memberSfMinimumRotationSpan
This bit will be set in the EventArgs of a Changed event every time the value returned by MinimumRotationSpan may have been changed.
Public fieldStatic memberSfMotionCapability
This bit will be set in the EventArgs of a Changed event every time the value returned by MotionCapability may have been changed.
Public fieldStatic memberSfMovingCamera
This bit will be set in the EventArgs of a Changed event every time the value returned by MovingCamera may have been changed.
Protected fieldStatic memberSfNextSf
Public fieldStatic memberSfSeparateCalPlate
This bit will be set in the EventArgs of a Changed event every time the value returned by SeparateCalPlate may have been changed.
Public fieldStatic memberSfTimeout
This bit will be set in the EventArgs of a Changed event every time the value returned by Timeout may have been changed.
Public fieldStatic memberSfTimeoutEnabled
This bit will be set in the EventArgs of a Changed event every time the value returned by TimeoutEnabled may have been changed.
Public fieldStatic memberSfTrackedRaw2DFeaturesAreSparse
This bit will be set in the EventArgs of a Changed event every time the value returned by TrackedRaw2DFeaturesAreSparse may have been changed.
Top
Properties

  NameDescription
Public propertyChangedEventSuspended
If nonzero, indicates that the raising of the Changed event has been suspended. This value is incremented when SuspendChangedEvent is called and decremented when ResumeAndRaiseChangedEvent is called.
(Inherited from CogSerializableChangedEventBase.)
Public propertyDistortionModel
The optical distortion model to be used in computing Raw2DFromCamera2D.
Public propertyEstimateMotionYAxis
For Cognex internal use only.
Public propertyHasChanged (Inherited from CogSerializableChangedEventBase.)
Public propertyHome2DUnitLengthReference
Specifies how unit length in Home2D is established.
Public propertyMinimumRotationSpan
The minimum required rotation angle span in radians among all input uncorrectedHome2DFromStage2D poses for motion capabilities that allows rotation. The run-time function will throw an exception if the rotation angle span among all input uncorrectedHome2DFromStage2D poses is less than this minimum requirement.
Public propertyMotionCapability
The motion capability of the stage.
Public propertyMovingCamera
Indicates if the cameras are moving or stationary.
Public propertySeparateCalPlate
Indicates if running separate calibration plate hand-eye calibration or regular big calibration plate calibration. This is only applicable when using corresponded point pairs as input for Execute overloads.
Public propertyStateFlags
Returns the complete set of state flags supported on this object. The flags may be indexed by name as shown in the following C# code snippet: if (changedObject.StateFlags["Color"] & eventArgs.StateFlags) { ... }
(Inherited from CogSerializableChangedEventBase.)
Public propertyTimeout
The maximum time in milliseconds that the Execute method will be allowed to run if TimeoutEnabled is true.
Public propertyTimeoutEnabled
Enable or disable timeout for the Execute methods.
Public propertyTrackedRaw2DFeaturesAreSparse
For Cognex internal use only.
Top
Events

  NameDescription
Public eventChanged
This event is raised when one or more parts of the object's state may have changed.
(Inherited from CogSerializableChangedEventBase.)
Top
Remarks

The CogHandEyeCalibrator computes the mathematical transform to map image coordinate positions to and from their corresponding coordinates in the coordinate system defined by the motion axes of the stage. This is a 2-D transform. This operator provides no 3-D information.

This operator can handle stationary and moving camera configurations. In the stationary-camera configuration, the physical position of the cameras remains unchanged when the motion stage moves. Typically, when calibrating cameras on such a system, a calibration plate is affixed to the motion stage and is moved by the motion stage during calibration. In the moving-camera configuration, the cameras may be mounted on the motion stage so that their physical positions change relative to the stage's home position. Typically, when calibrating cameras on such a system, a calibration plate is affixed to the machine's base and remains stationary during calibration, while the motion stage moves the cameras around. In both configurations, the relative position among all cameras always remains unchanged.

This operator also models systematic errors in the motion stage and determines the relationship between the parameters used to control the motion stage, i.e. (X,Y,Theta) and the actual physical pose of the stage in the home coordinate system.

Coordinate Systems

  1. Home coordinate system (Home2D)
    Home2D is the base reference space in which all other coordinate spaces and their relationships are described. Home2D is defined by the X axis of the motion stage and the motion stage's center of rotation. The origin is at the stage's center of rotation when the stage is at the home position. The X-axis of Home2D is perfectly aligned with the motion-stage's X-axis. The Y-axis of Home2D is exactly 90 degrees from the X-axis and in the general direction of the motion stage's Y-axis.
  2. Image coordinate system (Raw2D)
    Raw2D is the pixel space coordinate system of a single camera. There is one instance of such a coordinate system for each camera. Each camera's Raw2D coordinate system is independent of every other camera.
  3. Camera coordinate system (Camera2D)
    Camera2D is the physical orthonormal coordinate system for a single camera. There is one instance of such a coordinate system for each camera. The origin of Camera2D is at a position in Home2D that corresponds to the center of the camera's pelrect. Its X axis is parallel to the Raw2D X-axis at the Camera2D origin. The Y axis is exactly 90 degrees from the X-axis and in the general direction of the Raw2D Y axis.
  4. Calibration target coordinate system (Plate2D)
    Plate2D is the (global) coordinate system of the calibration plate. At any instance of time, all calibration features viewed by all cameras are described in the same Plate2D coordinate system. However, this space may be moved around in the Home2D coordinates by the motion stage. Plate2D is an orthonormal coordinate system, although its length unit may have a non-identity scale factor from Home2D. Plate2D and Home2D may have different handedness.
  5. Stage coordinate system (Stage2D)
    Stage2D is an orthonormal coordinate system that is attached to the motion stage's center of rotation, and moves along with the motion stage.

Handedness The operator assumes independent handedness among Home2D, Camera2D, and Plate2D.

Stage Pose and Systematic Errors in the Motion Stage

  1. Home2DFromStage2D (Actual physical pose of the motion stage)
    Home2DFromStage2D is the actual physical pose of the motion stage in Home2D. It defines the relationship between Home2D and Stage2D and can be represented by a 2D rigid transform.
  2. UncorrectedHome2DFromStage2D (Commanded pose of the motion stage)
    Due to systematic errors in the motion stage, the commanded pose of the motion stage may not match the actual physical pose of the motion stage in Home2D (i.e., Home2DFromStage2D). The term UncorrectedHome2DFromStage2D is used to describe the commanded pose of the motion stage because it represents the user's best guess of the pose of the motion stage prior to calibration.

Use cases of hand-eye calibration

We have three different usage cases for hand-eye calibration, which are:

  • Regular (using a big calibration plate) hand-eye calibration.
  • Separate calibration plates based hand-eye calibration.
  • TrackedRaw2DFeatures (from a part) based hand-eye calibration.

The differences of the three hand-eye calibration types are shown in the graph below:
-----------------------------------------------------------------------------
Regular big calibration plate based hand-eye calibration
                     ___                                ___
                    |   | Camera 1                     |   | Camera 2
                    |___|                              |___|
                     /_\                                /_







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

                   ____________________________________________________
                  /               Motion Stage                        /|
                 /    _______________________________________        / | 
                /    /                                      /|      /  |
               /    /   *    *    *    *    *    *    *    / /     /   |
              /    /                                      / /     /    |
             /    /   *    *    *    *    *    *    *    / /     /
            /    /                                      / /     /
           /    /   *    *    *    *    *    *    *    / /     /
          /    /             Big calibration plate    / /     /
         /    /   *    *    *    *    *    *    *    / /     /
        /    /                                      / /     /
       /    /   *    *    *    *    *    *    *    / /     /
      /    /                                      / /     /
     /    /    *    *    *    *    *    *    *   / /     /
    /    /______________________________________/ /     /
   /     |______________________________________|/     /
  /                                                   /
 /___________________________________________________/     
 |                                                   | 
 |                                                   |
-----------------------------------------------------------------------------
Separate calibration plates 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   /
 /___________________________________________________/
 |                                                   |
 |                                                   |
-----------------------------------------------------------------------------
Tracked Raw2D features (from a part) based hand-eye calibration

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





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

                   ____________________________________________________
                  /                                                   /|
                 /   _________                     _______           / |                                             
                /   /         \   Motion Stage    /       \         /  |
               /   /     *     \                 /  *      |       /   |  
              /   /   *        /________________/       *  |      /    |         
             /   |\___                                ____/|     /        
            /     \__/                               /____/     /     
           /        /        Runtime part           //         /
          /        /     (Calibration Object)      //         / 
         /        /                               //         /        
        /   _____/                               //___      /
       /   /             _____________        *       \    /  
      /   /     *       /_____________\               /|  /
     /   /   *      *  //             \\    *     *  //  /
    /   |\____________//               \\___________//  /
   /     \____________/                 \___________/  / 
  /                                                   /  
 /___________________________________________________/
 |                                                   |
 |                                                   |
-----------------------------------------------------------------------------

For regular calibration plate hand-eye calibration and separate calibration plate hand-eye calibration, depending on the value of property SeparateCalPlate, different calibration method will be called.

See Also