Automatic Calibration in Eye in Hand Scenarios (4-Axis/5-Axis Robot)
This operation guide describes how to complete automatic hand-eye calibration for a 4-axis/5-axis robot and a 2D camera in an Eye in Hand (EIH) scenario.
Overview
The overall workflow for automatic calibration of a 4-axis/5-axis robot in an Eye in Hand (EIH) scenario is shown below.
-
Preparation: Complete the required preparation before calibration.
-
Pre-Configuration: Select pre-configuration items before calibration, such as robot model and camera mounting method.
-
Start Calibration: Formally start calibration and obtain calibration results by completing a series of steps. This step involves robot-side operations to establish communication between the vision system and the robot.
-
Validate Calibration Results: Verify the obtained calibration results and check whether they meet requirements.
-
Apply Calibration Results: Use the new calibration parameter group in the vision project.
The following sections describe the workflow in detail.
Preparation
Before hand-eye calibration, complete the following preparation tasks:
Complete Camera Installation
Refer to the Camera Installation section to complete camera installation.
Hand-eye calibration requires Mech-Vision and Mech-Viz. Ensure these software products are installed and updated to the latest version.
Complete Robot Communication Configuration
If the robot communicates with the vision system through the standard interface, complete standard interface communication configuration for the robot. Depending on your robot brand, refer to the corresponding robot’s standard-interface communication configuration document in Standard Interface Communication.
If the robot communicates with the vision system through master control, complete master-control communication configuration for the robot. Depending on your robot brand, refer to the corresponding robot’s master-control communication configuration document in Master Control Communication.
Prepare Required Materials
Automatic calibration in ETH scenarios requires a calibration board or marker.
-
If you use a calibration board, prepare it according to the following requirements:
-
Make sure circles on the calibration board are clear, with no obvious scratches, and the board has no obvious bending or deformation.
-
In ETH scenarios, first install the calibration board connector on the robot end flange, then install the calibration board on the connector. Ensure the calibration board is firmly mounted, positioned at the center of the camera field of view, and as parallel as possible to the camera imaging plane, that is, as perpendicular as possible to the Z-axis of the camera coordinate system.
When a non-removable gripper is mounted on the robot flange, the calibration board can be directly fixed to the gripper.
-
-
If using a calibration board is inconvenient on site (for example, limited space or installation constraints), you can use a marker. Prepare it according to the following requirement:
-
The marker must have clear feature points, and the spatial distribution of feature points should be as uniform as possible.
-
Check Calibration Board Image Quality
| Calibration board image quality affects hand-eye calibration accuracy. Therefore, you need to check calibration board image quality. The calibration workflow includes this check, but you can also perform it in advance to reduce calibration time. |
-
Place the calibration board horizontally at the center of the work surface within the camera field of view.
-
In 2D Camera Management Tool, connect the camera and adjust camera parameters to ensure overall brightness of the calibration board in the 2D image is not too dark, too bright, or uneven, and each calibration circle is clearly visible.
If ambient light on site is complex, it is recommended to use shielding or supplementary lighting to reduce ambient light impact on 2D images.
Normal Overexposed Underexposed 


Complete Pre-Calibration Checks
Refer to Pre-Calibration Checks and complete the following checks:
-
Confirm the robot base is firmly installed.
-
Confirm the camera bracket and camera are firmly installed.
-
Confirm robot absolute accuracy meets requirements.
-
Verify robot model parameters are accurate.
-
Confirm the camera has no distortion, or distortion calibration has been completed.
-
Confirm camera warm-up has been completed.
Pre-Configuration
-
Open Mech-Vision. On the menu bar, choose . The Calibration Pre-Configuration window is displayed.
-
Open Mech-Vision. On the menu bar, choose . The Calibration Pre-Configuration window is displayed.
-
After confirming pre-calibration checks are completed, click Confirm Checks, then click Next.
-
In the Select How to Calibrate window, select Start New Calibration, then click Next.
-
In the Select Calibration Task window, select Hand-Eye Calibration for Supported-Brand Robots from the drop-down list, click Select Robot Model to choose the robot model used in the project, and then click Next.
-
In the Select Camera Mounting Method window, select Eye in Hand, then click Next.
-
In the Calibration Method and Robot Control Method window, select Automatic Calibration and Standard Interface, then click Start Calibration. The Calibration (Eye in Hand) window is displayed.
If master-control communication is used between the robot and the vision system, select Automatic Calibration and Master Control.
Pre-configuration is now complete. You can proceed to the formal calibration workflow.
Start Calibration
Connect Camera
-
Connect the camera.
In the Connect Camera step, you can select a connected camera from the drop-down list.
If no camera is available in the list, click 2D Camera Management, connect the camera in 2D Camera Management Tool, and then return here to select the corresponding camera.
-
Confirm the camera can capture images normally.
After connecting the camera, you can click Continuous Capture or Single Capture to view captured images in the Image View panel on the right.
When capturing images, ensure overall brightness of the calibration board is not too dark, too bright, or uneven, and each calibration circle is clearly visible. If image quality does not meet requirements, adjust Exposure Time and Gain to improve image quality.
-
Load distortion calibration results.
To eliminate image distortion and ensure subsequent hand-eye calibration is computed based on more accurate image coordinates, load distortion calibration results for the corresponding camera. The tool uses these results to correct captured images before subsequent calibration operations.
If you have already confirmed the camera has no distortion, this operation can be skipped.
After the camera is connected and image quality is confirmed, click Next on the bottom bar.
Select Calibration Method
The tool provides two calibration methods: Calibration with Calibration Board and Calibration with Feature Points.
Calibration with Calibration Board
This method is suitable for scenarios that require high calibration accuracy and have no suitable marker.
-
In the Calibration Method drop-down list, select Calibration with Calibration Board.
-
Based on the markings on the calibration board, select the model of the calibration board used in the Standard Calibration Board Model drop-down list.
Calibration with Feature Points
This method is suitable for scenarios where using a calibration board is inconvenient on site (limited space or installation constraints) and usable feature points already exist on a marker.
|
If edges of target workpieces are clear and not fully symmetric, the target workpiece can be used as a marker. |
The tool provides two feature-point calibration modes: 2D Matching and Obtain from Project.
| Feature Point Recognition Mode | Description | Operation |
|---|---|---|
2D Matching |
Recognizes feature points in images by template matching. Suitable for scenarios where feature points are regular and easy to match. |
Typical scenarios:
|
Obtain from Project |
Obtains feature points through existing processing flows in a vision project. Suitable for scenarios that require flexible feature-point acquisition using multiple image-processing methods (such as creating points and lines). |
|
Connect Robot
If standard-interface communication is used during calibration, refer to Connect Robot (Standard Interface).
If master-control communication is used during calibration, refer to Connect Robot (Master Control).
Connect Robot (Standard Interface)
-
(Optional) In the Connect Robot step, click Start Interface Service. The button changes to Waiting for Robot Connection…. If Standard Interface Communication on the toolbar is already enabled, this step is not required.
-
Perform robot-side operations on the robot teach pendant, that is, select the automatic calibration program, teach the calibration start point, and run the calibration program. After successful startup, the log panel prints a message indicating to start calibration in Mech-Vision.
Depending on your robot brand, refer to the corresponding robot’s automatic calibration documentation in Standard Interface Communication to complete robot-side operations.
Connect Robot (Master Control)
-
On the robot teach pendant, select and run the master-control program.
Depending on your robot brand, refer to the corresponding robot’s master-control communication configuration document in Master Control Communication to complete robot-side operations.
-
In the Connect Robot step, set Robot IP Address.
-
In the Connect Robot area, click Connect Robot. The button changes to Waiting for Robot Connection….
-
Wait until status information in the Connect Robot area shows robot disconnection is available, and then click Next on the bottom bar.
Set Motion Path
During calibration, the robot needs to move in sequence so that different positional and angular relationships are formed between the camera and calibration board, thereby collecting sufficient spatial feature information. The overall motion path usually includes two types of motion:
Translational motion: The robot end tool moves along the horizontal plane to a group of evenly distributed calibration points, from calibration point 1 to calibration point N.
Rotational motion (optional): After translational motion ends, the robot rotates around the Z-axis several times at the center of the path (for example, point 5 in a 3x3 path), to supplement pose variation information.
Detailed operations are as follows.
-
Set translational motion parameters
-
Number of translations: Determines the number and distribution range of sampled points during calibration. 3x3 is suitable for general accuracy requirements and fast calibration. 5x5 provides better spatial coverage and higher calibration accuracy, suitable for large field-of-view or high-accuracy scenarios.
-
Move interval: The translation distance between adjacent calibration points. A smaller interval makes calibration points denser and can improve calibration accuracy, but takes more time. When the number of translations is 3x3, set Move Interval to 1/4 to 1/8 of the Y field of view. When it is 5x5, set Move Interval to 1/8 to 1/12 of the Y field of view.
-
-
Set rotational motion parameters (optional)
If the robot end tool needs to rotate while picking workpieces, rotational calibration is recommended.
-
Number of rotations: Number of rotations, usually no less than 3.
-
Rotation angle: The angular change of each rotation relative to the previous one. Appropriate rotation angles can improve extrinsic parameter calculation accuracy.
-
After adjustment, in the Scene View panel on the right, confirm each path point position is reasonable and that no collision with surrounding objects occurs during robot movement. Then click Generate Path According to Parameters.
After motion path setup is complete, click Next on the bottom bar.
Obtain Feature Points and Poses
| Before this step, confirm that the current robot pose is consistent with the actual pose shown on the robot teach pendant. |
-
In the Obtain Feature Points and Poses step, click Start Calibration.
-
Carefully read the robot motion safety prompt in the pop-up window, then click OK.
-
Wait for the robot to move to each calibration point according to the configured path and for the camera to complete image capture at each point. The pop-up window displays progress.
Stay away from the robot working area during robot motion to avoid injury. -
When the pop-up window shows that all calibration points are completed and calibration is finished, click OK.
-
Confirm collected calibration data meets requirements, then click Next on the bottom bar.
If it does not meet requirements, manually move the robot (either using the teach pendant or through Mech-Viz), enable Manually Add More Images in the 3 Auxiliary Tools area, click Add Image and Record Flange Pose, add calibration board images, and enter robot flange poses.
Calculate Extrinsic Parameters
-
In the Calculate Extrinsic Parameters step, click Calculate Extrinsics in the Calculate Extrinsics and View Results area.
-
In the calibration-success dialog, click OK, and then view calibration results in the message panel below.
-
In the Calculate Extrinsic Parameters step, click Save on the bottom bar. When the message panel indicates successful save, calibration results are automatically saved to the
calibrationfolder of the solution.
Apply Calibration Results
After extrinsic parameter validation is completed, you can apply calibration results.
Select the 2D Smart Camera step, enable Enable Calibration in the step parameter panel, and select saved calibration results in the drop-down list. Then the calibration results can be used for subsequent vision processing and picking.
This completes the calibration workflow.