VPI - Vision Programming Interface

3.0 Release

Gaussian Filter

Runs a generic 2D Gaussian filter over the input image. More...

Functions

VPIStatus vpiSubmitGaussianFilter (VPIStream stream, uint64_t backend, VPIImage input, VPIImage output, int32_t kernelSizeX, int32_t kernelSizeY, float sigmaX, float sigmaY, VPIBorderExtension border)
 Runs a 2D Gaussian filter over an image. More...
 

Detailed Description

Runs a generic 2D Gaussian filter over the input image.

Refer to Gaussian Filter for more details and usage examples.

Function Documentation

◆ vpiSubmitGaussianFilter()

VPIStatus vpiSubmitGaussianFilter ( VPIStream  stream,
uint64_t  backend,
VPIImage  input,
VPIImage  output,
int32_t  kernelSizeX,
int32_t  kernelSizeY,
float  sigmaX,
float  sigmaY,
VPIBorderExtension  border 
)

#include </opt/nvidia/vpi3/include/vpi/algo/GaussianFilter.h>

Runs a 2D Gaussian filter over an image.

Parameters
[in]streamThe stream where the operation will be queued in.
  • Must not be NULL.
  • Stream must have enabled the backends that will execute the algorithm.
[in]backendBackend that will execute the algorithm.
[in]inputInput image to be filtered.
[out]outputImage where the result will be written to.
  • Must not be NULL.
  • Image must have enabled the backends that will execute the algorithm.
  • Must have same dimensions as input image.
[in]kernelSizeX,kernelSizeYGaussian kernel size in X and Y directions respectively. If 0, it'll be 2*ceil(3*sigma) rounded to the next odd size.
  • Limited between 1 and 11.
  • Must be odd.
[in]sigmaX,sigmaYStandard deviation of the Gaussian kernel in the X and Y directions respectively.
  • It must be a positive value.
  • If kernelSize==0, sigma is limited to 2.
[in]borderHow to handle pixels outside image boundaries.
Return values
VPI_ERROR_INVALID_ARGUMENTstream is NULL.
VPI_ERROR_INVALID_ARGUMENTinput or output are NULL.
VPI_ERROR_INVALID_ARGUMENTkernelSizeX or kernelSizeY outside valid range.
VPI_ERROR_INVALID_ARGUMENTsigmaX or sigmaY outside valid range.
VPI_ERROR_INVALID_ARGUMENTinput or output image dimensions outside valid range.
VPI_ERROR_INVALID_ARGUMENTinput and output image dimensions and format must be the same.
VPI_ERROR_INVALID_ARGUMENTborder not supported.
VPI_ERROR_INVALID_ARGUMENTbackend is invalid or unknown.
VPI_ERROR_INVALID_IMAGE_FORMATinput or output image format not supported.
VPI_ERROR_NOT_IMPLEMENTEDGaussian Filter algorithm is not supported by given backend.
VPI_ERROR_INVALID_OPERATIONBackend hardware not available.
VPI_ERROR_INVALID_OPERATIONThe needed backends aren't enabled in stream, input or output.
VPI_SUCCESSOperation executed successfully.