|
|
Line 1: |
Line 1: |
− | <noinclude>
| |
− | {{NVIDIA VPI GStreamer Plug-in/Head|previous=Examples/Videoconvert|next=Performance|keywords=}}
| |
− | </noinclude>
| |
| | | |
− | == Introduction ==
| |
− | The '''vpiconvolution''' element applies the [https://docs.nvidia.com/vpi/algo_convolution.html| 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'''<br/>
| |
− | Backend to use to execute VPI algorithms. Available options: <br/>
| |
− | ::'''cpu''': CPU backend
| |
− | ::'''cuda''': CUDA backend
| |
− | ::'''pva''': PVA backend (Xavier only)
| |
− | ::'''vic''': VIC backend
| |
− | Flags: readable, writable<br/>
| |
− | Default: "cuda"<br/>
| |
− |
| |
− | * '''kernel'''<br/>
| |
− | Convolution kernel to be applied with a minimum size of 1x1 and maximum size 11x11. Usage example: <br/>
| |
− | ::<<1.0, 0.0, -1.0>, <0.0, 0.0, 0.0>, <-1.0, 0.0, 1.0>><br/>
| |
− | Type: GstValueArray of GValues of type GstValueArray<br/>
| |
− | Flags: readable, writable<br/>
| |
− | Default: <<1>>
| |
− |
| |
− | * '''boundary'''<br/>
| |
− | How pixel values outside of the image domain should be treated. Available options: <br/>
| |
− | ::'''zero''': All pixels outside the image are considered 0.
| |
− | ::'''clamp''': Border pixels are repeated indefinitely.
| |
− | Flags: readable, writable<br/>
| |
− | 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:
| |
− |
| |
− | <syntaxhighlight lang=bash>
| |
− | 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
| |
− | </syntaxhighlight>
| |
− |
| |
− | <noinclude>
| |
− | {{NVIDIA VPI GStreamer Plug-in/Foot|Examples/Videoconvert|Performance }}
| |
− | </noinclude>
| |