Documentation Status

Package Summary

No API documentation

camera_calibration allows easy calibration of monocular or stereo cameras using a checkerboard calibration target.

image_pipeline: camera_calibration | depth_image_proc | image_proc | image_rotate | image_view | stereo_image_proc

Package Summary

Documented

camera_calibration allows easy calibration of monocular or stereo cameras using a checkerboard calibration target.

image_pipeline: camera_calibration | depth_image_proc | image_proc | image_rotate | image_view | stereo_image_proc

Package Summary

Released Continuous integration Documented

camera_calibration allows easy calibration of monocular or stereo cameras using a checkerboard calibration target.

image_pipeline: camera_calibration | depth_image_proc | image_proc | image_rotate | image_view | stereo_image_proc

Package Summary

Released Continuous integration Documented

camera_calibration allows easy calibration of monocular or stereo cameras using a checkerboard calibration target.

image_pipeline: camera_calibration | depth_image_proc | image_proc | image_rotate | image_view | stereo_image_proc

Package Summary

Released Continuous integration Documented

camera_calibration allows easy calibration of monocular or stereo cameras using a checkerboard calibration target.

image_pipeline: camera_calibration | depth_image_proc | image_proc | image_rotate | image_view | stereo_image_proc

Package Summary

Released Continuous integration Documented

camera_calibration allows easy calibration of monocular or stereo cameras using a checkerboard calibration target.

image_pipeline: camera_calibration | depth_image_proc | image_proc | image_rotate | image_view | stereo_image_proc

Package Summary

Released Continuous integration Documented

camera_calibration allows easy calibration of monocular or stereo cameras using a checkerboard calibration target.

This package uses OpenCV camera calibration, described here. For detailed information on the parameters produced by the calibration, see this description.

The code API listed for this package is for convenience only. This package has no supported code API.

Supported hardware

camera_calibration will work with any camera driver node satisfying the standard ROS camera interface. See the image_pipeline hardware requirements.

Tutorials

There are tutorials on how to run the calibration tool for monocular and stereo cameras.

Usage

Camera Calibrator

To run the cameracalibrator.py node for a monocular camera using an 8x6 chessboard with 108mm squares:

rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 image:=/my_camera/image camera:=/my_camera

To run the cameracalibrator.py node for a stereo camera:

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

cameracalibrator.py supports the following options:

  Chessboard Options:
    You must specify one or more chessboards as pairs of --size and
    --square options.

    -p PATTERN, --pattern=PATTERN
                        calibration pattern to detect - 'chessboard',
                        'circles', 'acircles'
    -s SIZE, --size=SIZE
                        chessboard size as NxM, counting interior corners
                        (e.g. a standard chessboard is 7x7)
    -q SQUARE, --square=SQUARE
                        chessboard square size in meters

  ROS Communication Options:
    --approximate=APPROXIMATE
                        allow specified slop (in seconds) when pairing images
                        from unsynchronized stereo cameras
    --no-service-check  disable check for set_camera_info services at startup

  Calibration Optimizer Options:
    --fix-principal-point
                        fix the principal point at the image center
    --fix-aspect-ratio  enforce focal lengths (fx, fy) are equal
    --zero-tangent-dist
                        set tangential distortion coefficients (p1, p2) to
                        zero
    -k NUM_COEFFS, --k-coefficients=NUM_COEFFS
                        number of radial distortion coefficients to use (up to
                        6, default 2)

Unsynchronized Stereo

New in D

By default, the image_pipeline assumes that stereo cameras are triggered to capture images simultaneously, and that matching image pairs have identical timestamps. This is the ideal situation, but requires hardware support.

Starting in Diamondback, you will be able to calibrate stereo pairs that are not (or inexactly) synchronized.

To enable approximate timestamp matching, give the --approximate=0.01 option. This permits a "slop" of 0.01s between image pairs. If you still don't see a display window, or it is sporadically updated, try increasing the slop.

Dual Checkerboards

New in D

Starting in Diamondback, you will be able to use multiple size checkerboards to calibrate a camera.

To use multiple checkerboards, give multiple --size and --square options for additional boards. Make sure the boards have different dimensions, so the calibration system can tell them apart.

Camera Check

To run the command-line utility to check the calibration of a monocular camera:

rosrun camera_calibration cameracheck.py --size 8x6 monocular:=/forearm image:=image_rect

To run the command-line utility to check the calibration of a stereo camera:

rosrun camera_calibration cameracheck.py --size 8x6 stereo:=/wide_stereo image:=image_rect

Nodes

cameracalibrator.py

cameracalibrator.py subscribes to ROS raw image topics, and presents a calibration window. It can run in both monocular and stereo modes. The calibration window shows the current images from the cameras, highlighting the checkerboard. When the user presses the CALIBRATE button, the node computes the camera calibration parameters. When the user clicks COMMIT, the node uploads these new calibration parameters to the camera driver using a service call.

Subscribed Topics

image (sensor_msgs/Image)
  • raw image topic, for monocular cameras
left (sensor_msgs/Image)
  • raw left image topic, for stereo cameras
right (sensor_msgs/Image)
  • raw right image topic, for stereo cameras

Services Called

camera/set_camera_info (sensor_msgs/SetCameraInfo)
  • Sets the camera info for a monocular camera
left_camera/set_camera_info (sensor_msgs/SetCameraInfo)
  • Sets the camera info for the left camera of a stereo pair
right_camera/set_camera_info (sensor_msgs/SetCameraInfo)
  • Sets the camera info for the right camera of a stereo pair

cameracheck.py

cameracheck.py subscribes to ROS rectified image topics and their associated camera_info, and prints out an error estimate. It can run in both monocular and stereo modes. The program expects to see a standard checkerboard target.

Subscribed Topics

monocular/image (sensor_msgs/Image)
  • rectified image topic, for monocular cameras
monocular/camera_info (sensor_msgs/CameraInfo)
  • camera info for the monocular camera
stereo/left/image (sensor_msgs/Image)
  • rectified left image topic, for stereo cameras
stereo/right/image (sensor_msgs/Image)
  • rectified right image topic, for stereo cameras
stereo/camera_info (sensor_msgs/CameraInfo)
  • camera info for the stereo pair

Wiki: camera_calibration (last edited 2014-05-08 16:21:32 by MaykelMoya)