VPI - Vision Programming Interface

3.2 Release

Recursive Gaussian Filter

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

Functions

VPIStatus vpiCreateRecursiveGaussianFilter (uint64_t backends, int32_t maxWidth, int32_t maxHeight, VPIPayload *payload)
 Creates payload for vpiSubmitRecursiveGaussianFilter. More...
 
VPIStatus vpiSubmitRecursiveGaussianFilter (VPIStream stream, uint64_t backend, VPIPayload payload, VPIImage input, VPIImage output, float sigmaX, float sigmaY, VPIBorderExtension border)
 Runs a Recursive Gaussian Filter over an image. More...
 

Detailed Description

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

It allows bigger sigma values than the ones available in direct-convolution-based Gaussian filter. Refer to Recursive Gaussian Filter for more details and usage examples.

Function Documentation

◆ vpiCreateRecursiveGaussianFilter()

VPIStatus vpiCreateRecursiveGaussianFilter ( uint64_t  backends,
int32_t  maxWidth,
int32_t  maxHeight,
VPIPayload payload 
)

#include <vpi/algo/RecursiveGaussianFilter.h>

Creates payload for vpiSubmitRecursiveGaussianFilter.

This function allocates all temporary memory needed by the algorithm.

Parameters
[in]backendsVPI backends that are eligible to execute the algorithm.
[in]maxWidthMaximum width in the input and output images provided for the algorithm.
  • It must be >= 1.
[in]maxHeightMaximum height in the input and output images provided for the algorithm.
  • It must be >= 1.
[out]payloadPointer to the payload variable that receives the created handle.
  • It must not be NULL.
Return values
VPI_ERROR_INVALID_ARGUMENTpayload is NULL.
VPI_ERROR_INVALID_ARGUMENTbackends refers to an invalid backend.
VPI_ERROR_INVALID_ARGUMENTmaxWidth or maxHeight outside valid range.
VPI_ERROR_INVALID_OPERATIONBackend hardware not available.
VPI_ERROR_NOT_IMPLEMENTEDAlgorithm does not support the given backend.
VPI_ERROR_INVALID_CONTEXTCurrent context is destroyed.
VPI_ERROR_OUT_OF_MEMORYCannot allocate required resources.
VPI_ERROR_INVALID_OPERATIONBackend isn't enabled in current context.
VPI_SUCCESSOperation executed successfully.

◆ vpiSubmitRecursiveGaussianFilter()

VPIStatus vpiSubmitRecursiveGaussianFilter ( VPIStream  stream,
uint64_t  backend,
VPIPayload  payload,
VPIImage  input,
VPIImage  output,
float  sigmaX,
float  sigmaY,
VPIBorderExtension  border 
)

#include <vpi/algo/RecursiveGaussianFilter.h>

Runs a Recursive Gaussian Filter over an image.

Parameters
[in]streamThe stream where the operation will be queued in.
  • It must not be NULL.
  • Stream must have enabled the backends that will execute the algorithm.
[in]backendBackend that will execute the algorithm.
[in]payloadPayload created by vpiCreateRecursiveGaussianFilter.
  • It must not be NULL.
[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 and format as input image.
[in]sigmaXStandard deviation for the Gaussian filter in the X direction.
  • It must be > 0.
[in]sigmaYStandard deviation for the Gaussian filter in the Y direction.
  • It must be > 0.
  • It must be equal to sigmaX.
[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_ARGUMENTpayload is not generated using vpiCreateRecursiveGaussianFilter.
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_ARGUMENTinput and output dimensions are bigger than the one defined in the payload.
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_INVALID_PAYLOAD_TYPEpayload is invalid.
VPI_ERROR_NOT_IMPLEMENTEDAlgorithm does not support the 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.