GStreamer - ZED Object Detection Overlay

Open in ClaudeOpen in ChatGPT

The ZED Object Detection Overlay, zedodoverlay GStreamer element, is a transform filter that allows drawing object detection bounding boxes on a ZED left color video stream. The incoming data stream must contain ZED Metadata. You can use the zeddatamux element to add back metadata to a ZED video stream in case a GStreamer filter removes them.

OD Multi class overlay road

The source code of this plugin is a complete example of how to process the ZED metadata in a GStreamer element to retrieve object detection data.

Properties

The element defines no specific property. gst-inspect-1.0 zedodoverlay reports the qos property inherited from GstBaseTransform, plus the name and parent properties inherited from GstObject:

name : The name of the object
flags: readable, writable, 0x2000
String. Default: "zedodoverlay0"
parent : The parent of the object
flags: readable, writable, 0x2000
Object of type "GstObject"
qos : Handle Quality-of-Service events
flags: readable, writable
Boolean. Default: false

Example pipelines

Display Object Detection bounding boxes

The following is a pipeline to acquire a stream at 720p resolution with RGB and MULTI CLASS Object Detection information and display the results on screen:

gst-launch-1.0 zedsrc stream-type=0 od-enabled=true od-detection-model=0 camera-resolution=3 camera-fps=30 ! queue ! \
zedodoverlay ! queue ! autovideoconvert ! fpsdisplaysink

Pipeline graph: zedsrc to queue, zedodoverlay, queue, autovideoconvert and fpsdisplaysink

OD Multi class overlay bridge

Display Skeleton Tracking results

The same pipeline of the previous example can be used to display Skeleton Tracking results by enabling Body Tracking on the zedsrc element with bt-enabled=true and selecting the model with the bt-detection-model property (2 is the ACCURATE model):

gst-launch-1.0 zedsrc stream-type=0 bt-enabled=true bt-detection-model=2 camera-resolution=3 camera-fps=30 ! queue ! \
zedodoverlay ! queue ! autovideoconvert ! fpsdisplaysink

Pipeline graph: zedsrc to queue, zedodoverlay, queue, autovideoconvert and fpsdisplaysink

OD Skeleton overlay