A collection of helper functions for the pi_vision stack for subscribing to image topics, converting them to OpenCV format for further processing by other nodes, and displaying processed images and markers.

How To Use

  • To launch a ros2opencv node using the Kinect RGB-D camera, use:

$ roslaunch ros2opencv openni_node.launch
  • To launch a ros2opencv node using a UVC-compatible webcam, use:

$ roslaunch ros2opencv uvc_cam.launch
  • To load an AVI file and re-publish it on the topic /camera/image_raw:

$ roslaunch ros2opencv avi2ros.launch input:=/path/to/avi/file
  • To publish the video on a different topic, use rosrun instead of roslaunch:

$ rosrun ros2opencv _input:=/path/to/avi/file output:=/your_topic

(Note the underscore in front of _input but not in front of output.)


A ROS node for subscribing to a ROS image topic, converting the image to OpenCV format, then displaying the processed image to the user along with possible text and graphic markers.

Subscribed Topics

~input_rgb_image (sensor_msgs/Image)
  • The ROS image topic to convert to OpenCV for further processing, e.g. /camera/rgb/image_color when using a Kinect and the openni_camera package.
~input_depth_image (sensor_msgs/Image)
  • The ROS image topic containing depth information, e.g. /camera/depth/image when using a Kinect and the openni_camera package.

Published Topics

/output_image (remapped in pi_face_tracker launch files to /pi_face_tracker/image) (sensor_msgs/Image)
  • The display image including markers republished from OpenCV to ROS

A ROS node for reading an AVI video file using OpenCV and re-publishing it as a ROS image topic. See the same launch file commands lines above for usage.

Published Topics

/output (sensor_msgs/Image)
  • The ROS Image stream corresponding to the input AVI file. Can be remapped on the command line or in a launch file.


~input (str, default: None)
  • Path to the AVI file to re-publish on the /output topic.
~start_paused (boolean, default: False)
  • Start the video in the paused state. Useful if you want to select a region before the video starts.
~loop (boolean, default: False)
  • Continuously loop the video once it reaches the end.
~fps (int, default: 25)
  • Run the video at fps frames per second.

Wiki: ros2opencv (last edited 2012-02-23 19:16:21 by Patrick Goebel)