Skip to main content
The qrb_ros_colorspace_convert sample application converts between NV12 and RGB888 formats. Qualcomm’s smart devices, such as the Qualcomm DragonwingTM IQ-9075 Evaluation Kit, use NV12 as the default image color space conversion format. However, most ROS 2 image processing nodes expect RGB888. Use qrb_ros_colorspace_convert to bridge the two. The qrb_ros_colorspace_convert sample application implements the following:
  • Converts NV12 to RGB888 through a ROS node API.
  • Converts RGB888 to NV12 through a ROS node API.
  • Accepts and returns a dmabuf file descriptor, so buffers are shared rather than copied.
  • Sends and receives images over QRB ROS transport.
  • Runs the conversion on the GPU through OpenGL ES.

Pipeline flow for qrb_ros_colorspace_convert

Figure: Pipeline flow for qrb_ros_colorspace_convert

ROS nodes used in the qrb_ros_colorspace_convert pipeline

ROS topics used in the qrb_ros_colorspace_convert pipeline

Prerequisites

Run out-of-the-box qrb_ros_colorspace_convert

1

Set up the runtime environment

Value range of ROS_DOMAIN_ID: [0, 232]
SSH Session
2

Run the sample qrb_ros_colorspace_convert

SSH Session
ResultTo confirm the conversion, compare the encoding of the input and output topics:
SSH Session
The two commands report different encodings — one NV12 and one RGB8 — in the direction you selected.