ChrisRun
ChrisRun

Reputation: 131

Eye-In-Hand Calibration OpenCV

I have a setup where a (2D) camera is mounted on the end-effector of a robot arm - similar to the OpenCV documentation: enter image description here

I want to calibrate the camera and find the transformation from camera to end-effector. I have already calibrated the camera using this OpenCV guide, Camera Calibration, with a checkerboard where the undistorted images are obtained.

My problem is about finding the transformation from camera to end-effector. I can see that OpenCV has a function, calibrateHandEye(), which supposely should achieve this. I already have the "gripper2base" vectors and are missing the "target2cam" vectors. Should this be based on the size of the checkerboard squares or what am I missing? Any guidance in the right direction will be appreciated.

Upvotes: 4

Views: 7589

Answers (1)

Chanoh Park
Chanoh Park

Reputation: 309

You are close to the answer.

Yes, it is based on the size of the checkerboard. But instead of directly taking those parameters and an image, this function is taking target2cam. How to get target2cam? Just simply move your robot arm above the chessboard so that the camera can see the chessboard and take a picture. From the picture of the chessboard and camera intrinsics, you can find target2cam. Calculating the extrinsic from the chessboard is already given in opencv.

Repeat this a couple of times at different robot poses and collect multiple target2cam. Put them calibrateHandEye() and you will get what you need.

Upvotes: 4

Related Questions