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

Image transport very slow when using png compression #207

Open
jbosch opened this issue Aug 26, 2021 · 0 comments
Open

Image transport very slow when using png compression #207

jbosch opened this issue Aug 26, 2021 · 0 comments

Comments

@jbosch
Copy link

jbosch commented Aug 26, 2021

I'm developing a ROS driver for a camera which is using image transport for publishing the images.

When using png as the format for the compressed stream the frame rate decreases drastically. For jpeg I manage to publish 30 fps while for png I only manage to publish 4 fps when setting the png_level to 1 (which is the minimum). I know this issue is due to the CPU intensive png encoding and is something not directly related to image_transport. However, is there any other approach I could use to increase the frame rate while using png compression?

I thought about using a pool of workers with an image transport publisher each, but it didn't work as each image transport publisher must have a different topic name.

The "best" solution I can think of is to encode the image in multiple workers (using cv::imencode) and later or publish them using normal publishers instead of image transport.

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

No branches or pull requests

1 participant