VPI - Vision Programming Interface

1.2 Release

Filter an image with a 2D binary kernel composed with the erode morphological operation. More...

Functions

VPIStatus vpiSubmitErode (VPIStream stream, uint32_t backend, VPIImage input, VPIImage output, const int8_t *kernelData, int32_t kernelWidth, int32_t kernelHeight, VPIBorderExtension border)
 Runs a 2D erode over an image. More...
 

Detailed Description

Filter an image with a 2D binary kernel composed with the erode morphological operation.

The function vpiSubmitErode is used to erode an image with a 2D kernel binary mask.

Function Documentation

◆ vpiSubmitErode()

VPIStatus vpiSubmitErode ( VPIStream  stream,
uint32_t  backend,
VPIImage  input,
VPIImage  output,
const int8_t *  kernelData,
int32_t  kernelWidth,
int32_t  kernelHeight,
VPIBorderExtension  border 
)

#include <vpi/algo/MorphologicalFilter.h>

Runs a 2D erode over an image.

Parameters
[in]streamThe stream handle where the operation will be queued in.
[in]backendBackend that will execute the algorithm.
[in]inputInput image to be eroded with the kernel.
[out]outputOutput image where the result is written to. Its image format and dimensions must be the same as input.
[in]kernelWidth,kernelHeightKernel dimensions.
[in]kernelDataErode kernel binary mask, i.e. structuring element or neighborhood definition, in row-major layout. Use nullptr for full neighborhood.
[in]borderBorder extension (use VPI_BORDER_INVALID to avoid outside pixels).
Returns
an error code on failure else VPI_SUCCESS.