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

RGB8 images are marked as big endian, why? #100

Open
peci1 opened this issue Jan 4, 2023 · 2 comments
Open

RGB8 images are marked as big endian, why? #100

peci1 opened this issue Jan 4, 2023 · 2 comments

Comments

@peci1
Copy link

peci1 commented Jan 4, 2023

# JPEG format
if data.shot.image.format == image_pb2.Image.FORMAT_JPEG:
image_msg.encoding = "rgb8"
image_msg.is_bigendian = True
image_msg.step = 3 * data.shot.image.cols

and similar are present in the camera driver part. The only little-endian thing is the 16UC1 depth image (which is correct as protobufs are always little).

Is there some reason for the single-byte values to be marked as big endian? If I understand it correctly, this has nothing to do with BGR/RGB as that is one level higher than endianness...

@heuristicus
Copy link
Owner

I don't know much about how ROS makes use of the endianness values when processing/publishing, but I suppose this might be because some things wouldn't work correctly if the endianness is left on its default of false?

Perhaps it's something to try removing and seeing if the images are still output as expected in rviz or other image viewers.

@peci1
Copy link
Author

peci1 commented Jan 12, 2023

I've tested it with both the mono images from body cameras and with the RGB camera from arm. Nothing changed in the look of the images as viewed by image_view, rqt_image_view, rviz or rqt_bag.

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

2 participants