Convolves an image with a 2D kernel. More...
Functions | |
| VPIStatus | vpiSubmitConvolution (VPIStream stream, uint32_t backend, VPIImage input, VPIImage output, const float *kernelData, int32_t kernelWidth, int32_t kernelHeight, VPIBorderExtension border) |
| Runs a generic 2D convolution over an image. More... | |
| VPIStatus | vpiSubmitSeparableConvolution (VPIStream stream, uint32_t backend, VPIImage input, VPIImage output, const float *kernelXData, int32_t kernelXSize, const float *kernelYData, int32_t kernelYSize, VPIBorderExtension border) |
| Runs a generic 2D convolution operation over an image, optimized for separable kernels. More... | |
Convolves an image with a 2D kernel.
vpiSubmitConvolution is used for generic 2D kernels, separable or not. For separable kernels, it's usually more efficient to use vpiSubmitSeparableConvolution.
| VPIStatus vpiSubmitConvolution | ( | VPIStream | stream, |
| uint32_t | backend, | ||
| VPIImage | input, | ||
| VPIImage | output, | ||
| const float * | kernelData, | ||
| int32_t | kernelWidth, | ||
| int32_t | kernelHeight, | ||
| VPIBorderExtension | border | ||
| ) |
#include <vpi/algo/Convolution.h>
Runs a generic 2D convolution 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 convolved with the kernel. |
| [out] | output | Output image where the result is written to. Its image format and dimensions must be the same as input. |
| [in] | kernelWidth,kernelHeight | Kernel dimensions. |
| [in] | kernelData | Convolution kernel coefficients, in row-major layout. |
| [in] | border | Border extension. |
| VPIStatus vpiSubmitSeparableConvolution | ( | VPIStream | stream, |
| uint32_t | backend, | ||
| VPIImage | input, | ||
| VPIImage | output, | ||
| const float * | kernelXData, | ||
| int32_t | kernelXSize, | ||
| const float * | kernelYData, | ||
| int32_t | kernelYSize, | ||
| VPIBorderExtension | border | ||
| ) |
#include <vpi/algo/Convolution.h>
Runs a generic 2D convolution operation over an image, optimized for separable kernels.
| [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 convolved with the kernel. |
| [out] | output | Output image where the result is written to. Its image format and dimensions must be the same as input's. |
| [in] | kernelXSize,kernelYSize | Kernel dimensions in X and Y directions. |
| [in] | kernelXData,kernelYData | Convolution kernel coefficients, in both X and Y directions respectively. |
| [in] | border | Border extension. |