NvDsDrawFunc
- class savant.deepstream.drawfunc.NvDsDrawFunc(**kwargs)
Default implementation of PyFunc for drawing on frame. Uses OpenCV GpuMat to work with frame data without mapping to CPU through OpenCV-based Artist.
PyFunc implementations are defined in and instantiated by a
PyFunc
structure.- draw(buffer, frame_meta)
Draw metadata on a frame in a batch.
- Parameters:
buffer (Buffer) – Gstreamer buffer.
frame_meta (NvDsFrameMeta) – Frame metadata for a frame in a batch.
- override_draw_spec(object_meta, draw_spec)
Override draw specification for an object based on dynamically changing object properties. For example, re-assign bbox color from default per object class one to custom per track id one.
- Parameters:
object_meta (ObjectMeta) – Object’s meta
draw_spec (ObjectDraw) – Draw specification
- Returns:
Overridden draw specification
- Return type:
ObjectDraw
- draw_on_frame(frame_meta, artist)
Draws bounding boxes and labels for all objects in the frame’s metadata.
- Parameters:
frame_meta (NvDsFrameMeta) – Frame metadata.
artist (ArtistGPUMat) – Artist to draw on the frame.