Rosanswers logo

Hi everybody

We have a stereo camera setup here where each camera is angled in towards other by 10 degrees (i.e. toe-in, convergent cameras)

 cam 1 /--- baseline ---\ cam 2  (with cameras looking up, towards the top)

I have tried to calibrate the stereo cameras with the camera_calibration package with the following command:

rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.0720 right:=/stereo/right/image_raw left:=/stereo/left/image_raw right_camera:=/stereo/right left_camera:=/stereo/left

My problem now is that the distance estimates are only accurate at about 5m, the further we move the object away, the closer the camera claims it is and vice versa.

  • Does the camera calibration node take a toe-in angle into account when computing the projection and rectification matrix or does it have to be specified manually?
  • Also, does the camera calibration parser assume that the baseline is specified in the camera_info messages?

Your help would be greatly appreciated. Thanks, Daniel

Originally posted by dpickem on ROS Answers with karma: 11 on 2012-06-12

Post score: 1


1 Answer 1


Rosanswers logo

This is probably solved, but as far as I am aware the calibration process actually estimates the base line and the toe-in angle indirectly as part of the extrinsic parameters. In the OpenCV calibration docs, you will find this quote:

The functions below use the above model to

  • Project 3D points to the image plane given intrinsic and extrinsic parameters

  • Compute extrinsic parameters given intrinsic parameters, a few 3D points and their projections.

  • Estimate intrinsic and extrinsic camera parameters from several views of a known calibration pattern (i.e. every view is described by several 3D-2D point correspodences).

  • Estimate the relative position and orientation of the stereo camera “heads” and compute the rectification transformation that makes the camera optical axes parallel.

So you would not have to explicitly specify the baseline in the CameraInfo messages, as they are already part of the projection matrix (usually P[3] in the right CameraInfo message)

Originally posted by georgebrindeiro with karma: 1264 on 2012-11-08

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.