hbVPCanny

typedef enum {
    HB_VP_NORM_L1 = 1,
} hbVPCannyNorm;

Canny算子参数。

  • 成员

    枚举名称描述
    HB_VP_NORM_L1norm L1滤波。
typedef struct {
    uint32_t     threshold1;
    uint32_t     threshold2;
    int8_t       kernelSize;
    int8_t       norm;
    int8_t       overlap;
} hbVPCannyParam;

Canny算子参数。

  • 成员

    成员名称描述
    threshold1低位阈值。
    threshold2高位阈值。
    kernelSize滤波核大小,支持大小为3、5或7。
    norm支持hbVPCannyNorm中的类型。
    overlap保留参数。
int32_t hbVPCanny(hbUCPTaskHandle_t *taskHandle,
                  hbVPImage *dstImg,
                  hbVPImage const *srcImg,
                  hbVPCannyParam const *cannyParam);

调用Canny API。

  • 参数
    • [out] taskHandle 任务句柄,负责算子与UCP架构的交互。
    • [out] dstImg 输出图像,type、format和大小与输入图像一致。
    • [in] srcImg 输入图像,type支持U8C1,format支持Y。
    • [in] cannyParam 算子参数。
  • 返回值
    • 返回 0 则表示API成功执行,否则执行失败。