This package contains the image_proc node, which is meant to sit between the camera driver and vision processing nodes. image_proc removes camera distortion from the raw image stream, and if necessary will convert Bayer or YUV422 format image data to color.

Monocular processing example

image_raw: Original camera image, Bayered and distorted

image_rect_color: Rectified image, de-Bayered and undistorted (amount of black border may vary depending on calibration)

New in ROS Electric image_proc also contains the crop_decimate nodelet, which applies decimation and ROI to a raw image in software.

Mini Tutorial

Make sure your camera driver is running. You can check rostopic list | grep image_raw to see the available raw image topics from compatible drivers.

Normally the raw image from the camera driver is not what you want for visual processing, but rather an undistorted and (if necessary) debayered image. This is the job of image_proc. If you are running on a robot, it's probably best to run image_proc there. For example, if the driver is publishing topics /my_camera/image_raw and /my_camera/camera_info you would do:

$ ROS_NAMESPACE=my_camera rosrun image_proc image_proc

Notice that we push our image_proc instance down into the /my_camera namespace, in which it subscribes to the image_raw and camera_info topics. All output topics are likewise published within the /my_camera namespace.

In a separate terminal (on your home machine, if you are running on a robot):

$ rosrun image_view image_view image:=my_camera/image_rect_color

This will display an undistorted color image from "my_camera".



De-mosaics and undistorts the raw camera image stream.

All processing is on demand. Color processing is performed only if there is a subscriber to a color topic. Rectification is performed only if there is a subscriber to a rectified topic. While there are no subscribers to output topics, image_proc unsubscribes from the image_raw and camera_info topics.

image_transport is used for all publications and subscriptions.

Subscribed Topics

image_raw (sensor_msgs/Image)
  • Raw image stream from the camera driver.
camera_info (sensor_msgs/CameraInfo)
  • Camera metadata.

Published Topics

image_mono (sensor_msgs/Image)
  • Monochrome unrectified image.
image_rect (sensor_msgs/Image)
  • Monochrome rectified image.
image_color (sensor_msgs/Image)
  • Color unrectified image.
image_rect_color (sensor_msgs/Image)
  • Color rectified image.


~queue_size (int, default: 5)
  • Size of message queue for synchronizing image and camera_info topics. You may need to raise this if images take significantly longer to travel over the network than camera info.

Wiki: image_proc/common (last edited 2015-05-06 21:04:20 by WilliamWoodall)