image_transport_plugins: compressed_image_transport | theora_image_transport
- Code API
- diamondback
- electric
- fuerte
- unstable - Tutorials
- Troubleshooting
- FAQ
- Reviews (Doc reviewed)
Used by (10)
Package Summary
compressed_image_transport provides a plugin to image_transport for transparently sending images compressed as JPEG or PNG.
- Author: Patrick Mihelich
- License: BSD
- Repository: ros-pkg
- Source: svn https://code.ros.org/svn/ros-pkg/stacks/image_transport_plugins/trunk/compressed_image_transport
Contents
Overview
compressed_image_transport is a plugin package for image_transport. It enables any node using image_transport classes to publish and subscribe to compressed image topics. Compression format (JPEG or PNG) and quality can be changed on the fly.
compressed_image_transport works only with 8-bit color or grayscale images.
Before reading this page, make sure you understand the image_transport package
Tutorials
See image_transport/Tutorials for general instruction on using image_transport. compressed_image_transport is featured in the image_transport tutorial Examining the Simple Image Publisher and Subscriber.
ROS API
Publisher plugin
Published Topics
<base_topic>/compressed (sensor_msgs/CompressedImage)- Compressed transport subtopic.
Parameters
Searchable parameters
The plugin searches up the parameter tree starting from the <base_topic> namespace. For example, with topic /image, you could set parameter /compressed_image_transport_jpeg_quality to a global default, then override it for the specific topic by setting /image/compressed_image_transport_jpeg_quality.- Compression format to use, "jpeg" or "png".
- JPEG quality percentile, in the range [1, 100]. Lower values trade image quality for space savings.
- PNG compression level, in the range [1, 9]. Higher values trade computation time for space savings.
Parameters
Reconfigurable parameters
Starting in Diamondback, all publisher parameters are dynamically reconfigurable per-topic. See dynamic_reconfigure for details on dynamically reconfigurable parameters.- Compression format to use, "jpeg" or "png".
- JPEG quality percentile, in the range [1, 100]. Lower values trade image quality for space savings.
- PNG compression level, in the range [1, 9]. Higher values trade computation time for space savings.
Subscriber plugin
Subscribed Topics
<base_topic>/compressed (sensor_msgs/CompressedImage)- Compressed transport subtopic.
Publishing compressed images directly
Some cameras (particularly webcams) output their image data already in JPEG format. When writing a driver for such a camera, a quick and dirty approach is to simply copy the JPEG data into a sensor_msgs/CompressedImage message and publish it on a topic of the form image_raw/compressed. Then any ROS node using image_transport can subscribe to image_raw with transport compressed, just as if image_transport were used on the publisher side. Of course, the other transport topics (including image_raw itself) will not be available.






