Convolves an image with a 2D kernel. More...
Functions | |
VPIStatus | vpiSubmitConvolution (VPIStream stream, VPIBackend backend, VPIImage input, VPIImage output, const float *kernelData, uint32_t kernelWidth, uint32_t kernelHeight, VPIBoundaryCond boundary) |
Runs a generic 2D convolution over an image. More... | |
VPIStatus | vpiSubmitSeparableConvolution (VPIStream stream, VPIBackend backend, VPIImage input, VPIImage output, const float *kernelXData, uint32_t kernelXSize, const float *kernelYData, uint32_t kernelYSize, VPIBoundaryCond boundary) |
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, |
VPIBackend | backend, | ||
VPIImage | input, | ||
VPIImage | output, | ||
const float * | kernelData, | ||
uint32_t | kernelWidth, | ||
uint32_t | kernelHeight, | ||
VPIBoundaryCond | boundary | ||
) |
#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 | The 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] | boundary | Boundary condition. |
VPIStatus vpiSubmitSeparableConvolution | ( | VPIStream | stream, |
VPIBackend | backend, | ||
VPIImage | input, | ||
VPIImage | output, | ||
const float * | kernelXData, | ||
uint32_t | kernelXSize, | ||
const float * | kernelYData, | ||
uint32_t | kernelYSize, | ||
VPIBoundaryCond | boundary | ||
) |
#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 | The 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] | boundary | Boundary condition. |