Runs a 2D median filter over the input image. More...
Functions | |
VPIStatus | vpiSubmitMedianFilter (VPIStream stream, uint64_t backend, VPIImage input, VPIImage output, int32_t kernelWidth, int32_t kernelHeight, const int8_t *kernelData, VPIBorderExtension border) |
Runs a 2D median filter over an image. More... | |
Runs a 2D median filter over the input image.
Refer to Median Filter for more details and usage examples regarding Median Filter.
VPIStatus vpiSubmitMedianFilter | ( | VPIStream | stream, |
uint64_t | backend, | ||
VPIImage | input, | ||
VPIImage | output, | ||
int32_t | kernelWidth, | ||
int32_t | kernelHeight, | ||
const int8_t * | kernelData, | ||
VPIBorderExtension | border | ||
) |
#include </opt/nvidia/vpi2/include/vpi/algo/MedianFilter.h>
Runs a 2D median filter over an image.
[in] | stream | A stream handle where the operation will be queued into. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[in] | backend | Backend that will execute the algorithm.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[in] | input | Input image to be denoised.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[out] | output | Output image where the result is written to.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[in] | kernelWidth,kernelHeight | Kernel dimensions. The coordinate of the kernel weight that is aligned with the source pixel is given by the following formula: \begin{align*} k_x &= \mathit{kernelWidth}/2 \\ k_y &= \mathit{kernelHeight}/2 \end{align*}
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[in] | kernelData | Median kernel binary mask. It defines the structuring element or median calculation mask, in row-major layout. The pixel under a non-zero kernel element be used in median calculation. Size the kernel elements are copied to an internal buffer, the given buffer can be deallocated after the call. Use NULL for all elements in median calculation, i.e. all kernel elements considered to be non-zero.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[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 | input and output image dimensions and formats do not match. |
VPI_ERROR_INVALID_ARGUMENT | Image dimensions aren't supported for given format. |
VPI_ERROR_INVALID_ARGUMENT | border not supported. |
VPI_ERROR_INVALID_ARGUMENT | backend is invalid or unknown. |
VPI_ERROR_INVALID_IMAGE_FORMAT | input and output formats aren't supported |
VPI_ERROR_NOT_IMPLEMENTED | Median filter algorithm is not supported by given backend. |
VPI_ERROR_INVALID_OPERATION | Backend hardware not available. |
VPI_ERROR_INVALID_OPERATION | The needed backends aren't enabled in stream , input or output . |
VPI_SUCCESS | Operation executed successfully. |