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

[jsk_perception/image_publisher.py] Support bgr16, rgb16, bgra16 and rgba16 encodings and compressedDepth for 32FC1 depth image #2714

Merged
merged 12 commits into from Jul 19, 2022

Conversation

iory
Copy link
Member

@iory iory commented Jul 17, 2022

What is this?

In current, image_publisher.py not supports bgr16, rgb16, bgra16 and rgba16 encodings and compressedDepth for 32FC1 depth image.
This PR enables them to publish.

cc: @nakane11

@nakane11
Copy link
Member

I was able to get added images and confirmed that 949d29b correctly modified angle field of view to make focal lengths equal for RGBA image.

This change is used to check pixel depth conversion of jsk-ros-pkg/jsk_visualization#851

@nakane11
Copy link
Member

I send a PR that adds warning for invalid jpeg compression. iory#15
I'd be grateful if you could check it.

imencode() loses alpha-value and outputs inverted rgb image.
It also requires 8 bit depth, so 16/32 bit depth image changes to too bright.

In my opinion, jpeg image don't need to be fixed. Instead we can add another node with a suitable encoding to get compressed image.

nakane11 and others added 4 commits July 19, 2022 06:56
…ion (#15)

* [jsk_perception/image_publisher] Use cv2_to_compressed_imgmsg

* [jsk_perception/image_publisher] Set compressed image format according to filename
@iory iory changed the title [jsk_perception/image_publisher.py] Support bgr16, rgb16, bgra16 and rgba16 encodings [jsk_perception/image_publisher.py] Support bgr16, rgb16, bgra16 and rgba16 encodings and compressedDepth for 32FC1 depth image Jul 18, 2022
@iory
Copy link
Member Author

iory commented Jul 18, 2022

Thanks for your feedback.

By specifying png compression for images with alpha and 16-bit images, imencode can now be executed correctly. 84196a7
626988d

@k-okada k-okada merged commit f9dfa5f into jsk-ros-pkg:master Jul 19, 2022
@iory iory deleted the image-publisher branch July 19, 2022 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants