ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Is there a node/package for periodic camera calibration?

asked 2014-07-11 02:03:11 -0600

PedroGusmao gravatar image

Hi there, I have a single rgb camera with known intrinsic parameters mounted to a robot together with a chessboard pattern fixed the robot's base.

The chess board is fixed and I already publish its transform relative to the base, but the camera position may change (tilt) overtime which will certainly influence on the visual measurements I am making.

So my question is: Is there a node/package that I can use that automatically publishes the TF for a camera given a fixed pattern? I remind you that I already have the intrinsics parameters and that theses are published using CameraInfo.

Thanks, Pedro

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-07-11 08:27:41 -0600

I have not heard of such a package. Surely you could run anything periodically with just a simple script, but the cleanest way to do what you are after is use the OpenCV function solvePNP(). It takes as an input the 2D pixel coordinates of your calibration pattern points and the corresponding 3D world coordinates. The output is the translation vector and the rotation vector. You can get a rotation matrix out of the rotation vector with OpenCV function Rodrigues(). The pattern 2D coordinates can be found from the image using either findChessboardCorners() or findCirclesGrid(), depending on your pattern.

This is exactly what OpenCV uses for camera calibration and ROS simply uses OpenCV for the task. You will find the OpenCV examples on the Internet.

One thing to keep in mind is that due to the possible symmetry of your calibration pattern, the rotation vector might be 180 degrees rotated from what you expect.

Sorry for giving an OpenCV answer to a ROS question.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2014-07-11 02:03:11 -0600

Seen: 194 times

Last updated: Jul 11 '14