使用由腐蚀形态学操作组成的 2D 二值核过滤图像。 更多...
函数 | |
VPIStatus | vpiSubmitErode (VPIStream stream, uint64_t backend, VPIImage input, VPIImage output, const int8_t *kernelData, int32_t kernelWidth, int32_t kernelHeight, VPIBorderExtension border) |
对图像运行 2D 腐蚀操作。 更多... | |
使用由腐蚀形态学操作组成的 2D 二值核过滤图像。
有关腐蚀的更多详细信息和使用示例,请参阅 腐蚀。
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>
对图像运行 2D 腐蚀操作。
[in](输入) | stream | 将在其中排队操作的流句柄。
|
[in](输入) | backend | 将执行该算法的后端。 |
[in](输入) | input | 要使用内核腐蚀的输入图像。
|
[out](输出) | output | 结果写入到的输出图像。
|
[in](输入) | kernelWidth,kernelHeight | 内核尺寸。
|
[in](输入) | kernelData | 腐蚀内核二值掩码,即结构元素或邻域定义,采用行优先布局。内核元素被复制到内部缓冲区。调用后可以释放传递的缓冲区。对于完整邻域,使用 NULL,所有元素都视为 1。
|
[in](输入) | border | 如何处理图像边界外的像素。
|
VPI_ERROR_INVALID_ARGUMENT | stream 为 NULL。 |
VPI_ERROR_INVALID_ARGUMENT | input 或 output 为 NULL。 |
VPI_ERROR_INVALID_ARGUMENT | kernelWidth 或 kernelHeight 超出有效范围。 |
VPI_ERROR_INVALID_ARGUMENT | input 和 output 图像必须具有相同的尺寸和格式。 |
VPI_ERROR_INVALID_ARGUMENT | 不支持 border 。 |
VPI_ERROR_INVALID_IMAGE_FORMAT | 不支持 input 格式。 |
VPI_ERROR_NOT_IMPLEMENTED | 给定后端不支持腐蚀算法。 |
VPI_ERROR_INVALID_OPERATION | stream 、input 或 output 中未启用所需的后端。 |
VPI_SUCCESS | 操作成功执行。 |