Filter an image with a 2D binary kernel composed with the erode morphological operation. More...
Functions | |
VPIStatus | vpiSubmitErode (VPIStream stream, uint64_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... | |
Filter an image with a 2D binary kernel composed with the erode morphological operation.
Refer to Erode for more details and usage examples regarding Erode.
VPIStatus vpiSubmitErode | ( | VPIStream | stream, |
uint64_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.
[in] | stream | The stream handle where the operation will be queued in.
|
[in] | backend | Backend that will execute the algorithm.
|
[in] | input | Input image to be eroded with the kernel.
|
[out] | output | Output image where the result is written to.
|
[in] | kernelWidth,kernelHeight | Kernel dimensions.
|
[in] | kernelData | Erode kernel binary mask, i.e. structuring element or neighborhood definition, in row-major layout. The kernel elements are copied to an internal buffer. The buffers passed can be deallocated after the call. Use NULL for full neighborhood, all elements considered to be 1.
|
[in] | border | How to handle pixels outside image boundaries.
|
VPI_ERROR_INVALID_ARGUMENT | stream is NULL. |
VPI_ERROR_INVALID_ARGUMENT | input or output are NULL. |
VPI_ERROR_INVALID_ARGUMENT | kernelWidth or kernelHeight outside valid range. |
VPI_ERROR_INVALID_ARGUMENT | input and output images must have same dimensions and format. |
VPI_ERROR_INVALID_ARGUMENT | border not supported. |
VPI_ERROR_INVALID_IMAGE_FORMAT | input format not supported. |
VPI_ERROR_NOT_IMPLEMENTED | Erode algorithm is not supported by given backend. |
VPI_ERROR_INVALID_OPERATION | The needed backends aren't enabled in stream , input or output . |
VPI_SUCCESS | Operation executed successfully. |