ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Announcing imagezero_transport, a fast, lossless image transport plugin

ImageZero is a lossless, very fast compression algorithm for 24-bit color photographic images. Its compression ratio is comparable to PNG, but it compresses over twenty times faster and decompresses almost twice as fast.

I’ve made a new ROS stack that makes it easy to use ImageZero as a transport mechanism for any ROS topics that are already using the image_transport mechanism. It’s available on GitHub at https://github.com/swri-robotics/imagezero_transport, and it has been successfully built in the ROS Shadow repository, so it should be available in the next releases of ROS Indigo, Jade, and Kinetic. The imagezero_transport stack provides three packages:

  • imagezero: The original ImageZero algorithm built as a shared library using catkin
  • imagezero_ros: A shared library that provides convenience methods for converting between sensor_msgs/Image and sensor_msgs/CompressedImage messages using ImageZero
  • imagezero_image_transport: A plugin for the ROS image_transport package which adds an /imagezero sub-topic to ImageTransport topics that can be used to transparently use ImageZero to compress your images

For a little bit of backstory and a use case, I’m working on a system that is doing image processing on 10 Hz video feeds coming from stereo cameras connected to one computer than is publishing the video across a network as ROS Image topics. The uncompressed image data was consuming over 400 Mbps of bandwidth by itself, which was enough to choke other services on the 1 Gbps network. We looked at using the built-in JPG and PNG image transports, but JPG was unsuitable for our image processing algorithms because it’s lossy and PNG was unusable because it is so CPU-intensive that the host computer’s processor could not compress the image stream in real time.

After searching around for a while for image compression algorithms, I found ImageZero, which suits our needs perfectly. It’s lossless, designed explicitly for 24-bit color natural photography, and fast enough that our processors can easily do it on a real-time video feed. The bandwidth from our cameras is now down to about 150 Mbps.

Hopefully other people find this as useful as I have!

P. J. Reed, Senior Research Analyst
(210) 522-6948
Intelligent Vehicle Systems
Southwest Research Institute

4 Likes

Cool :slight_smile:.

It might be worth adding a note on the image_transport wiki page which points out there are other options for compression like this one:

http://wiki.ros.org/image_transport

Feel free to add a pointer to your documentation.

It might also make sense to add a tutorial on how to use your transport:

http://wiki.ros.org/image_transport/Tutorials

It would probably fit in nicely with the tutorial about adding a new transport type.

2 Likes