-
Notifications
You must be signed in to change notification settings - Fork 35
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
Set the format of compressed image following image_transport. #104
Conversation
python/coral_usb/detector_base.py
Outdated
@@ -325,7 +325,8 @@ def visualize_cb(self, event): | |||
# publish compressed http://wiki.ros.org/rospy_tutorials/Tutorials/WritingImagePublisherSubscriber # NOQA | |||
vis_compressed_msg = CompressedImage() | |||
vis_compressed_msg.header = header | |||
vis_compressed_msg.format = "jpeg" | |||
# image format https://github.com/ros-perception/image_transport_plugins/blob/f0afd122ed9a66ff3362dc7937e6d465e3c3ccf7/compressed_image_transport/src/compressed_publisher.cpp#L116 # NOQA | |||
vis_compressed_msg.format = 'rgb8; jpeg compressed bgr8' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is rgb8, not bgr8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the format should be like this.
vis_compressed_msg.format = 'rgb8; jpeg compressed bgr8' | |
vis_compressed_msg.format = vis_img.encoding + '; jpeg compressed rgb8' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just a pseudo code, so it does not work properly...
Thank you for your review! |
this pr is moved to #105. |
In image_transport, the character compressed is added to the format before compressing with; as the delimiter.
https://github.com/ros-perception/image_transport_plugins/blob/f0afd122ed9a66ff3362dc7937e6d465e3c3ccf7/compressed_image_transport/src/compressed_publisher.cpp#L116
https://github.com/ros-perception/image_transport_plugins/blob/f0afd122ed9a66ff3362dc7937e6d465e3c3ccf7/compressed_depth_image_transport/src/codec.cpp#L234
Related to jsk-ros-pkg/jsk_common#1738