image_transport_plugins
image_transport_plugins copied to clipboard
[ADD] flag for jpeg compression of bayer format
This PR adds a flag that allows for jpeg compression of Bayer encoded images. Although I fully understand why one does not want a lossy compression of Bayer encoded image, it worked pretty well for us when testing it with multiple camera images.
We really want to use compressed Bayer images to get recordings smaller, e.g. we record 10Hz image_streams of 8 cameras with 3MP each. With this PR there is no need for "inflating" the data to a color image prior to compression.
is there any reason for not introducing this this parameter? We are using this functionality every time, but we need to keep it forked...
conflicts are fairly simple and I will solve them, if the general idea is welcomed.
I would also be interested in this, any maintainer willing to review this? @wodtko , you may be interested in my comment on #68
Thanks for bringing it up again @andrei-ng :D I was only using ROS2 in this specific context, so I'm not sure about the exact issue in ros noetic.
However, different to the result in the issue mentioned, the bayer image is currently converted to a mono image prior to compression. Thus, there is no way of retrieving a color image afterwards... This PR adds a separate section for handling bayer formats to omit the mono color conversion.
Thanks for bringing it up again @andrei-ng :D I was only using ROS2 in this specific context, so I'm not sure about the exact issue in ros noetic.
However, different to the result in the issue mentioned, the bayer image is currently converted to a mono image prior to compression. Thus, there is no way of retrieving a color image afterwards... This PR adds a separate section for handling bayer formats to omit the mono color conversion.
@wodtko , thanks for the clarification. I haven't used ROS2 in this context. I hope that by the time I use it, your PR will be merged :) .
Well, if anyone would review my changes, I would be happy to resolve any CI issues. (mainly rebasing this PR)