NVIDIA VPI GStreamer Plug-in - Examples - Gaussian Filter

From RidgeRun Developer Connection
< NVIDIA VPI GStreamer Plug-in‎ | Examples
Revision as of 12:23, 26 October 2020 by Jsalas (talk | contribs) (Created page with "<noinclude> {{NVIDIA VPI GStreamer Plug-in/Head|previous=Examples|next=Performance|keywords=}} </noinclude> == Introduction == The '''vpigaussianfilter''' element applies the...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



Previous: Examples Index Next: Performance





Introduction

The vpigaussianfilter element applies the Gaussian Filter algorithm from the NVIDIA VPI library to a video stream.

Element properties

  • size-x

Gaussian kernel size in X direction. Must be between 0 and 11, and odd. If it is 0, sigma-x will be used to compute its value using the formula [math]\displaystyle{ size = max\{ 3,2*\lceil 3 \sigma \rceil -1 \} }[/math]. In this case, sigma is limited to 2.
Type: Integer
Range: 0 - 11
Flags: readable, writable
Default: 7

  • size-y

Gaussian kernel size in Y direction. Must be between 0 and 11, and odd. If it is 0, sigma-y will be used to compute its value using the formula [math]\displaystyle{ size = max\{ 3,2*\lceil 3 \sigma \rceil -1 \} }[/math]. In this case, sigma is limited to 2.
Type: Integer
Range: 0 - 11
Flags: readable, writable
Default: 7

  • sigma-x

Standard deviation of the Gaussian kernel in the X direction. If it is 0, size-x will be used to compute its value using the formula [math]\displaystyle{ 0.3 * ((size - 1) * 0.5 - 1) + 0.8 }[/math].
Type: Double
Range: 0 - 1,797693e+308
Flags: readable, writable
Default: 1.7

  • sigma-y

Standard deviation of the Gaussian kernel in the Y direction. If it is 0, size-y will be used to compute its value using the formula [math]\displaystyle{ 0.3 * ((size - 1) * 0.5 - 1) + 0.8 }[/math].
Type: Double
Range: 0 - 1,797693e+308
Flags: readable, writable
Default: 1.7

  • 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 the Gaussian filter to the input video stream from your camera. You may modify the properties values according to the information above.

For a Gaussian filter given by kernel size of 3 in the X direction and 7 in the Y direction, with a sigma value of 0.9 in both directions, and a boundary condition of clamp you may use:

gst-launch-1.0 v4l2src ! videoconvert ! vpiupload ! vpigaussianfilter size-x=3 size-y=7 sigma-x=0.9 sigma-y=0.9 boundary=clamp ! vpidownload ! videoconvert ! xvimagesink


Previous: Examples Index Next: Performance