QOI (Quite OK Image) format available as image_transport (lossless RGB(A) 50x faster than PNG)

Today I’ve learned about QOI (Quite OK Image) format (while reading GIMP 3.0 release notes!). I followed the urge and implemented image_transport for it.

It can be used for lossless compression of RGB or RGBA images. Its compression ratio is comparable to lossless PNG, but encoding is 10-50x faster and decoding 2-4x faster. Check the benchmark.

Thanks to our package image_transport_codecs, qoi_image_transport offers not only the normal image_transport functionality (on subtopic “qoi”), but it also provides a pure C++/Python interface to do image encoding and decoding without the need of going through the tedious and unreliable pub/sub cycle. If you’re interested, I’m curious about your opinions on image_transport_codecs and whether such thing should be used as the general backend for image_transport.

Slightly related advertisement:

If you now want to convert some of your bag files and images in them to QOI format, you can utilize our cras_bag_tools/filter_bag utility, e.g. with a recompress config. But feel free to explore also the other implemented filters, e.g. for topic filtering by name/type/size, TF filtering, remapping of topics or fixing wrong frame_ids .

Even less relevant advertisement:

The package is fully REUSE-compatible. This means automated license checking and composition of SBOM is possible. Join the movement and upgrade your packages with REUSE! There is even a handy Github Action for verifying compatibility.

7 Likes

The package has been sent for release to Noetic today, so it will hopefully pop up after the next Noetic sync.

A ROS 2 port is planned when we move over :smiley:

And we have a Noetic release!

Just sudo apt update && sudo apt install ros-noetic-qoi-image-transport or <exec_depend>qoi_image_transport</exec_depend> !

See qoi_image_transport - ROS Wiki for more details.

Good job getting it through!

I went for it back in 2022, however, I aimed to include it in image_tranport_plugins. I ran out of cycles to publish it separately myself.

In case it’s helpful for your ROS2 migration, I implemented it at the time for ROS2 too: Adding QOI compression support to ROS2 by awesomebytes · Pull Request #104 · ros-perception/image_transport_plugins · GitHub

It’s full of merge conflicts as far as I can see, but maybe still useful.

Again, thanks a lot for implementing and sharing, I think it’s a great codec for lossless!

3 Likes