Skip to navigation

Gst-nvdsosd

View as Markdown

This plugin draws bounding boxes, text, arrows, lines, circles 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 when CPU process mode. It can accept RGBA/NV12 PL/NV12 BL buffers when GPU process mode. It draws bounding boxes (including oriented bounding boxes, OBB), 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.

Gst-nvdsosd

Inputs and Outputs

  • Inputs

    • RGBA buffer for CPU process mode. RGBA/NV12 PL/NV12 BL buffer for GPU process mode.
    • 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
    • display-bbox
    • display-mask
    • blur-bbox
    • blur-on-gie-class-ids
  • Output

    • RGBA/NV12 PL/NV12 BL 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.

Gst-nvsosd features

FeatureDescriptionRelease
Supports drawing oriented bounding boxes (OBB)Rotated rectangles can be drawn by specifying rotation_angle values in NvOSD_RectParams in metadata.DS 9.0
Supports blurring detected objectsThe object can be blurred according to the parameters configured.DS 8.0
Supports drawing arrows, lines, circles, text in GPU modeFill metadata as described in below rows to draw different shapes. (Alpha)DS 6.2
Supports drawing arrowsArrows can be drawn by specifying values in NvOSD_ArrowParams in metadata.DS 5.0
Supports drawing circlesCircles can be drawn by specifying values in NvOSD_CircleParams in metadata.DS 5.0
Support for blending bounding boxesBlending boxes can be drawn by specifying bg_color values in NvOSD_RectParams in metadata.DS 4.0
Supports drawing polygon linesLines can be drawn by specifying values in NvOSD_LineParams in metadata.DS 3.0
Supports drawing text using Pango and Cairo librariesText can be drawn by specifying values in NvOSD_TextParams in metadata.DS 2.0
CPU mode and GPU support for drawing bounding boxes.
Setting opacity for bounding box borders is not supported in gpu mode.
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.

Gst-nvsosd gst properties

PropertyMeaningType and RangeExample Notes
gpu-idDevice ID of the GPU to be used for operation (dGPU only)Integer,
0 to 4,294,967,295
gpu-id=0
display-clockIndicates whether to display system clockBooleandisplay-clock=0
display-textIndicates whether to display textBooleandisplay-text=0
clock-fontName of Pango font to use for the clock for CPU process mode,
name of TrueType font to use for the clock and other text for GPU process mode
Stringclock-font=Arial
clock-font-sizeFont size to use for the clockInteger, 0-60clock-font-size=2
x-clock-offsetX offset of the clockInteger,
0 to 4,294,967,295
x-clock-offset=100
y-clock-offsetY offset of the clockInteger,
0 to 4,294,967,295
y-clock-offset=50
clock-colorColor of the clock to be set while display, in the order 0xRGBAInteger,
0 to 4,294,967,295
clock-color=0xff0000ff
(Clock is red with alpha=1)
process-modeIndicates the mode used to draw the objects
Default mode: GPU mode
0: CPU mode
1: GPU mode
Integer, 0 to 1process-mode=0
display-bboxControl bounding box drawingBooleandisplay-bbox=1
display-maskControls instance mask drawingBooleandisplay-mask=1
blur-bboxControl object blurring(GPU mode only)Booleanblur-bbox=1
blur-on-gie-class-idsSelect the object to blur(GPU mode only and the blur-bbox must be 1)Semicolons and commas delimited valuesblur-on-gie-class-ids=0,1;1,0;2,1 format:<gie_id,class_id;gie_id,class_id…>