GStreamer - ZED Metadata
GStreamer - ZED Metadata
The stream of data injected in a GStreamer pipeline by the zedsrc element contains color and depth information plus metadata with sensors and object detection data. The zedxonesrc element attaches the same metadata structure to its buffers, with the object detection and sensors sections left empty.
The ZED metadata are defined in the GStreamer library gstzedmeta.
Metadata information
GstZedSrcMeta: metadata global containerZedInfo: general information about the ZED camera that acquired the data.ZedPose: Positional Tracking information.ZedSensors: data from the camera sensors (if available).ZedImu: 6 DOF inertial data (if available).ZedMag: 3 DOF magnetic field data (if available).ZedEnv: environmental data, atmospheric pressure and internal temperature (if available).ZedCamTemp: camera CMOS temperatures (if available).ZedObjectData: object detection data (if available).
Data Structures
GstZedSrcMeta
meta: metadata identifier field.info: camera information.pose: camera pose.sens: sensors data.od_enabled: indicates if object detection data are available.obj_count: the number of detected objects [max 256].frame_id: track the meta/buffer throughout the GStreamer pipeline (when working with source code)objects: array of detected objects.
ZedInfo
cam_model: camera model, i.e. the value of thesl::MODELenum of the ZED SDK (0: ZED,1: ZED Mini,2: ZED 2,3: ZED 2i,4: ZED X,5: ZED X Mini,9: ZED X Nano,11: Virtual ZED X,30: ZED X One GS,31: ZED X One 4K,33: ZED X One Core [ZED SDK v5.5 and newer]). The field is a direct copy of thesl::MODELenum, so the set of possible values follows the ZED SDK release used to build the plugin.stream_type: type of stream, i.e. the resolved value of thestream-typeproperty of the source element (0: Left image,1: Right image,2: Stereo couple up/down,3: 16-bit depth map,4: Left + Depth up/down,5: Stereo couple left/right). On NVIDIA® Jetson™ with ZED SDK v5.2 or newer the zero-copy NV12 values6(left),7(stereo side-by-side) and8(right) can also be reported.grab_single_frame_width: original width of image data.grab_single_frame_height: original height of image data.
ZedPose
pose_avail: indicates if camera pose is available.pos_tracking_state: status of the Positional Tracking algorithm, i.e. the value of thesl::POSITIONAL_TRACKING_STATEenum of the ZED SDK (0: SEARCHING [deprecated, no longer returned],1: OK,2: OFF,3: FPS_TOO_LOW,4: SEARCHING_FLOOR_PLANE,5: UNAVAILABLE)pos: camera positionorient: camera orientation (Euler angles).
ZedSensors
sens_avail: indicates if sensors data are available (all camera models with IMU support, i.e. every model except the original ZED).imu: IMU data.mag: Magnetometer data.env: environment data.temp: camera temperatures data
An example about how to retrieve Sensors data is provided with the gstzeddatacsvsink element source code
ZedImu
imu_avail: indicates if IMU data are available (all camera models with IMU support, i.e. every model except the original ZED).acc: 3 DOF accelerometer data in [m/s²].gyro: 3 DOF gyroscope data in [rad/sec].temp: IMU temperature in [°C].
ZedMag
mag_avail: indicates if magnetometer data are available (ZED 2 and ZED 2i only).mag: 3 DOF magnetic field data in [µT].
ZedEnv
env_avail: indicates if environment data are available (ZED 2 and ZED 2i only).press: atmospheric pressure in [hPa].temp: internal camera temperature in [°C].
ZedCamTemp
temp_avail: indicates if CMOS temperatures data are available (ZED 2 and ZED 2i only).temp_cam_left: temperature of the left CMOS sensor in [°C].temp_cam_right: temperature of the right CMOS sensor in [°C].
ZedObjectData
id: unique identifier of the tracked object.label: class of the identified object.sublabel: subclass of the identified object [only for MULTICLASS models]tracking_state: tracking status of the object.action_state: action status of the object (static or moving).confidence: confidence level of the detection [0, 100].position: 3D position of the center of the object.position_covariance: covariance matrix of the position.velocity: velocity of the objectbounding_box_2d: 2D image coordinates of the four corners of the bounding boxbounding_box_3d: 3D world coordinates of the eight corners of the bounding boxdimensions: 3D dimensions of the 3D bounding boxskeletons_avail: indicates if a skeleton tracking detection was enabled and if skeleton data are availableskel_format: number of keypoints of the body format in use (18,34,38or70), driven by thebt-formatproperty of thezedsrcelement, which currently exposes the 18, 34 and 38 keypoint formats. It tells how many entries ofkeypoint_2d/keypoint_3dare meaningful.keypoint_2d: 2D image coordinates of the skeleton joints. The array is always dimensioned for the largest body format (70 joints); only the firstskel_formatentries are valid.keypoint_3d: 3D world coordinates of the skeleton joints, with the same convention askeypoint_2d.head_bounding_box_2d: 2D image coordinates of the four corners of the bounding box of the headhead_bounding_box_3d: 3D world coordinates of the eight corners of the bounding box of the headhead_position: 3D world coordinates of the position of the center of the head
Skeleton body formats
The skeleton namespace defines one enumeration of body parts, one getIdx_* helper and one list of bones for each of the four body formats supported by the Body Tracking module. The format in use is reported by the skel_format field of ZedObjectData and is selected with the bt-format property of the zedsrc element.
The 18-keypoint format, for example, is defined as follows:
The complete definition of the four formats is available in the gstzedmeta.h header.
An example about how to use Object Detection data is provided with the gstzedodoverlay element source code

