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

Set the format of compressed image following image_transport. #104

Closed
wants to merge 2 commits into from

Conversation

@@ -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'
Copy link
Member

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.

Copy link
Member

@knorth55 knorth55 Jun 2, 2022

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.

Suggested change
vis_compressed_msg.format = 'rgb8; jpeg compressed bgr8'
vis_compressed_msg.format = vis_img.encoding + '; jpeg compressed rgb8'

Copy link
Member

@knorth55 knorth55 Jun 2, 2022

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...

@iory
Copy link
Member Author

iory commented Jun 2, 2022

Thank you for your review!
I modified the format.

@knorth55
Copy link
Member

knorth55 commented Jun 2, 2022

this pr is moved to #105.
I checked with Coral USB device.

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

Successfully merging this pull request may close these issues.

None yet

2 participants