NVIDIA VPI GStreamer Plug-in -

From RidgeRun Developer Connection
Revision as of 11:26, 5 March 2021 by Jrodriguez (talk | contribs) (Created page with "<noinclude> {{NVIDIA VPI GStreamer Plug-in/Head|previous=Examples/Videoconvert|next=Performance|keywords=}} </noinclude> == Introduction == The '''vpiconvolution''' element a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



Previous: Examples/Videoconvert Index Next: Performance





Introduction

The vpiconvolution element applies the Convolution algorithm from the NVIDIA VPI library to a video stream. In order to use this algorithm you must provide the kernel matrix to be applied.

Element properties

  • backend

Backend to use to execute VPI algorithms. Available options:

cpu: CPU backend
cuda: CUDA backend
pva: PVA backend (Xavier only)
vic: VIC backend

Flags: readable, writable
Default: "cuda"

  • kernel

Convolution kernel to be applied with a minimum size of 1x1 and maximum size 11x11. Usage example:

<<1.0, 0.0, -1.0>, <0.0, 0.0, 0.0>, <-1.0, 0.0, 1.0>>

Type: GstValueArray of GValues of type GstValueArray
Flags: readable, writable
Default: <<1>>

  • boundary

How pixel values outside of the image domain should be treated. Available options:

zero: All pixels outside the image are considered 0.
clamp: Border pixels are repeated indefinitely.

Flags: readable, writable
Default: "zero"

Example

The following example pipe will help you apply convolution to the input video stream from your camera. You may modify the properties values according to the information above.

For a convolution given by an edge detection kernel of size 3x3, and a boundary condition of zero you may use:

gst-launch-1.0 nvarguscamerasrc ! nvvidconv ! vpiupload ! vpiconvolution kernel="<<1.0, 0.0, -1.0>, <0.0, 0.0, 0.0>, <-1.0, 0.0, 1.0>>" ! vpidownload ! nvvidconv ! 'video/x-raw(memory:NVMM),format=I420' ! nvoverlaysink


Previous: Examples/Videoconvert Index Next: Performance