Compress images into custom message

asked 2017-02-14 18:36:48 -0500

Miiller gravatar image

I want to build a frame filter to synchronize the image streams from an RGBD camera into one message. I am using a ApproximateTime Synchronizer to listen to the sensor_msgs/Image and sensor_msgs/CameraInfo streams and want to publish them in a single message (see blow).

How do I compress/decompress the images to put them into the message? Is it possible to build the messages manually by compressing/decompressing the images with OpenCV? Can I utilize image_transport for that to avoid high memory consumption across several nodes?


Header header
sensor_msgs/CompressedImage rgb_image
sensor_msgs/CompressedImage depth_image
sensor_msgs/CameraInfo rgb_cam
sensor_msgs/CameraInfo depth_cam
edit retag flag offensive close merge delete