hbVPWarpPerspective

typedef struct { float transformMatrix[9]; int8_t interpolation; int8_t borderType; uint8_t borderValue; int8_t isInverse; } hbVPWarpPerspectiveParam;

WarpPerspective算子参数。

  • 成员

    成员名称描述
    transformMatrix[9]WarpPerspective转换矩阵,3X3矩阵。
    interpolationWarpPerspective中的插值类型,支持 hbVPInterpolationType 中的NEAREST和LINEAR类型。
    borderType保留参数。
    borderValue保留参数。
    isInverse标志transformMatrix是否为逆矩阵,非零表示逆矩阵(src = M * dst),0表示正矩阵(dst = M * src)
int32_t hbVPWarpPerspective(hbUCPTaskHandle_t *taskHandle, hbVPImage *dstImg, hbVPImage const *srcImg, hbVPPerspectiveParam const *perspectiveParam);

调用WarpPerspective API。

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