VPI - Vision Programming Interface

3.0 Release

Box Filter

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

Functions

VPIStatus vpiSubmitBoxFilter (VPIStream stream, uint64_t backend, VPIImage input, VPIImage output, int32_t kernelWidth, int32_t kernelHeight, VPIBorderExtension border)
 Runs a 2D box filter over an image. More...
 

Detailed Description

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

Refer to Box Filter for more details and usage examples.

Function Documentation

◆ vpiSubmitBoxFilter()

VPIStatus vpiSubmitBoxFilter ( VPIStream  stream,
uint64_t  backend,
VPIImage  input,
VPIImage  output,
int32_t  kernelWidth,
int32_t  kernelHeight,
VPIBorderExtension  border 
)

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

Runs a 2D box filter over an image.

Parameters
[in]streamA stream handle where the operation will be queued into.
  • 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]outputOutput image where the result is written to.
  • Must not be NULL.
  • It must have same dimensions and format as input.
  • Image must have enabled the backends that will execute the algorithm.
[in]kernelWidth,kernelHeightBox kernel dimensions. Can be non-square.
  • Both must be between 1x1 and 11x11, and odd.
[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_ARGUMENTkernelWidth or kernelHeight outside valid range.
VPI_ERROR_INVALID_ARGUMENTinput or output image dimensions ouside valid range.
VPI_ERROR_INVALID_ARGUMENTinput and output image dimensions or format do not match.
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_OPERATIONBackend hardware is not available.
VPI_ERROR_INVALID_OPERATIONThe needed backends aren't enabled in stream, input or output.
VPI_ERROR_NOT_IMPLEMENTEDBox Filter algorithm is not supported by given backend.
VPI_SUCCESSOperation executed successfully.