-
Notifications
You must be signed in to change notification settings - Fork 221
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
Nv12 color format #1318
base: rolling
Are you sure you want to change the base?
Nv12 color format #1318
Conversation
- Introduce a new `convertNV12ToRGBData` method for handling NV12 images - Correctly handle separate Y and UV planes within the NV12 buffer - Ensure proper stride usage for row and column indexing - Update `setFormatAndNormalizeDataIfNecessary` to recognize "nv12" encoding Signed-off-by: Zhaoyuan Cheng <[email protected]>
rviz: display: image: Add NV12 to RGB conversion support in rviz2
Pulls: #1318 |
Hi @ahcorde , Thanks, |
@ros-pull-request-builder retest this please |
Oh right, the Rpr CI job listed here on GitHub is expected to fail until a new release of |
Sure
|
update convertNV12ToRGBData, modify width_ to stride_ Signed-off-by: quic-zhaoyuan <[email protected]>
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.
@quic-zhaoyuan Do you mind to merge with rolling ? I think the warnings that I see on the CI are already fixed
sure, this PR is set to commit into rolling I think
|
Overview
This PR adds NV12-to-RGB conversion functionality to rviz2. It leverages the newly introduced NV12 encoding in the ROS2 common_interfaces (see ros2/common_interfaces#253).
Details
convertNV12ToRGBData()
for NV12 images.setFormatAndNormalizeDataIfNecessary()
to handle the "nv12" encoding.Rationale
Previously, rviz2 did not include a built-in NV12 conversion, resulting in garbled or miscolored images when receiving NV12-encoded topics. With the new encoding support merged into common_interfaces, this PR provides a seamless way to correctly display NV12 image streams in rviz2.
Testing
Dependencies
This PR relies on the changes merged in ros2/common_interfaces#253, which introduced the NV12 encoding definition into sensor_msgs.
Thank you for reviewing and considering this PR! If you have any questions or need additional information, please let me know.