Gst-nvdsosd¶
This plugin draws bounding boxes, text, and region of interest (RoI) polygons. (Polygons are presented as a set of lines.) The plugin accepts an RGBA buffer with attached metadata from the upstream component. It draws bounding boxes, which may be shaded depending on the configuration (e.g. width, color, and opacity) of a given bounding box. It also draws text and RoI polygons at specified locations in the frame. Text and polygon parameters are configurable through metadata.
Inputs and Outputs¶
Inputs
RGBA buffer
NvDsBatchMeta (holds NvDsFrameMeta consisting of bounding boxes, text parameters, and lines parameters)
NvDsLineMeta (RoI polygon)
Control parameters
gpu-id (dGPU only)
display-clock
display-text
clock-font
clock-font-size
x-clock-offset
y-clock-offset
clock-color
process-mode
hw-blend-color-attr
display-bbox
display-mask
Output
RGBA buffer modified in place to overlay bounding boxes, texts, and polygons represented in the metadata
Features¶
The following table summarizes the features of the plugin.
¶ Feature
Description
Release
Supports drawing arrows
Arrows can be drawn by specifying values in NvOSD_ArrowParams in metadata.
DS 5.0
Supports drawing circles
Circles can be drawn by specifying values in NvOSD_CircleParams in metadata.
DS 5.0
Support for blending bounding boxes
Blending boxes can be drawn by specifying bg_color values in NvOSD_RectParams in metadata. For HW mode, hw-blend-color-attr property for OSD needs to be set for blending.
DS 4.0
Supports drawing polygon lines
Lines can be drawn by specifying values in NvOSD_LineParams in metadata.
DS 3.0
Supports drawing text using Pango and Cairo libraries
Text can be drawn by specifying values in NvOSD_TextParams in metadata.
DS 2.0
VIC (Jetson only) and GPU support for drawing bounding boxes
Bounding boxes can be drawn by specifying values in NvOSD_RectParams in metadata.
DS 2.0
Gst Properties¶
The following table describes the Gst properties of the Gst-nvdsosd plugin.
¶ Property
Meaning
Type and Range
Example Notes
gpu-id
Device ID of the GPU to be used for operation (dGPU only)
Integer, 0 to 4,294,967,295
gpu-id=0
display-clock
Indicates whether to display system clock
Boolean
display-clock=0
display-text
Indicates whether to display text
Boolean
display-text=0
clock-font
Name of Pango font to use for the clock
String
clock-font=Arial
clock-font-size
Font size to use for the clock
Integer, 0-60
clock-font-size=2
x-clock-offset
X offset of the clock
Integer, 0 to 4,294,967,295
x-clock-offset=100
y-clock-offset
Y offset of the clock
Integer, 0 to 4,294,967,295
y-clock-offset=50
clock-color
Color of the clock to be set while display, in the order 0xRGBA
Integer, 0 to 4,294,967,295
clock-color=0xff0000ff (Clock is red with alpha=1)
process-mode
Indicates the mode used to draw the objects
0: CPU mode
1: GPU mode (For dGPU only)
2: VIC mode (For Jetson only)
Integer, 0 to 2
process-mode=0
hw-blend-color-attr
Blending color attributes for all classes. To be used for process-mode=2 (VIC based blending). If this property is set, shaded bboxes will be drawn using blending. Property to be set in the form: “Class_ID,R,G,B,A” for each class separated by a “:” Only applicable on Jetson. Note that for HW mode, this property must be set , otherwise objects will not be blended with required colors.
String
hw-blend-color-attr=0,0.0,1.0,0.0,0.3:1,1.0,0.0,0.3.0.3
display-bbox
Control bounding box drawing
Boolean
display-bbox=1
display-mask
Controls instance mask drawing
Boolean
display-mask=1