Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add CompressedImage publisher #708

Open
Aposhian opened this issue Oct 27, 2021 · 0 comments
Open

Feature: Add CompressedImage publisher #708

Aposhian opened this issue Oct 27, 2021 · 0 comments

Comments

@Aposhian
Copy link

Feature description

I want to be able to run

ros2 run compressed_image_publisher compressed_image_publisher <some-compressed-stream-url>

and see compressed images published as sensor_msgs/CompressedImage messages. I want a way to bring compressed images into ROS without doing any decompression or recompression.

Rationale

image_publisher uses cv::VideoCapture to open arbitrary video streams, and then decodes them into raw frames and publishes as sensor_msgs/Image. However, it is sometimes desirable to use sensor_msgs/CompressedImage message for either storage or network bandwidth concerns.

It is currently possible to use image_publisher to get a raw Image, and then use compressed_image_transport to recompress the image, but that is quite inefficient.

Implementation Concerns

While there is already support in cv_bridge for building CompressedImage messages from cv::Mat, I can't see a way to use cv::VideoCapture in a way that does not decode frames.

Also, would this better belong in image_pipeline or image_transport_plugins?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants