The Gst-nvofvisual plugin is useful for visualizing motion vector data. The visualization method is similar to the OpenCV reference source code in: The plugin solves the optical flow problem by computing the magnitude and direction of optical flow from a two-channel array of flow vectors. It then visualizes the angle (direction) of flow by hue and the distance (magnitude) of flow by value of Hue Saturation Value (HSV) color representation. The strength of HSV is always set to a maximum of 255 for optimal visibility.


Inputs and Outputs

  • Inputs

    • GStreamer buffer containing NV12/RGBA frame(s)

    • NvDsOpticalFlowMeta containing the motion vector (MV) data generated by the gst-nvof plugin

  • Control parameters

    • gpu-id, selects the GPU ID

  • Output

    • GStreamer buffer containing RGBA frame(s)

    • RGBA buffer generated by transforming MV data into color-coded RGBA image reference


The following table summarizes the features of the plugin.

Gst-nvofvisual plugin features




Configure GPU selection

Sets the GPU ID to be used for optical flow visualization operations (valid only for dGPU platforms)

DS 4.0

Gst Properties

The following table describes the Gst properties of the Gst-nvofvisual plugin.

Gst-nvofvisual plugin gst properties



Type and Range

Example Notes


Device ID of the GPU to be used (dGPU only)

Integer, 0 to 4,294,967,295