hbVPWarpAffine

typedef struct { float transformMatrix[6]; int8_t interpolation; int8_t borderType; uint8_t borderValue; int8_t isInverse; } hbVPAffineParam;

WarpAffine算子参数。

  • 成员

    成员名称描述
    transformMatrix[6]WarpAffine转换矩阵(dst->src),2X3矩阵。
    interpolationWarpAffine中的插值类型,只支持 hbVPInterpolationType 中的NEAREST和LINEAR类型。
    borderType保留参数。
    borderValue保留参数。
    isInverse标志transformMatrix是否为逆矩阵,非零表示逆矩阵(src = M * dst),0表示正矩阵(dst = M * src)
int32_t hbVPWarpAffine(hbUCPTaskHandle_t *taskHandle, hbVPImage *dstImg, hbVPImage const *srcImg, hbVPAffineParam const *affineParam);

调用WarpAffine API。

  • 参数
    • [out] taskHandle 任务句柄,负责算子与UCP架构的交互。
    • [out] dstImg 输出图像,type和format与输入图像一致,尺寸大小由转换矩阵计算得出。
    • [in] srcImg 输入图像,type支持U8C1,format支持Y和nv12。
    • [in] affineParam 算子参数指针。
  • 返回值
    • 返回 0 则表示API成功执行,否则执行失败。