FastCV主要接口分析之一

FastCV主要接口分析之一
    安装Hexagon SDK后,会在安装的主目录下<sdk_root>/Hexagon_SDK/2.0/lib/fastcv/hexagon_Release_v5存在如下文件:
   
    上图中,fastcv.h是其对外暴露的接口,libfastcvadsp.a是函数的具体实现,部分接口的定义及含义如下:
    1. 图像格式转换:

        FASTCV_API void
        fcvColorYUV420toRGB565u8( const uint8_t* __restrict src,
                          unsigned int              srcWidth,
                          unsigned int              srcHeight,
                          uint32_t*  __restrict     dst );

        数据图像格式转换函数,转换YUV (YCrCb) 4:2:0到RGB 888格式,相反的函数如下

        FASTCV_API void
        fcvColorRGB888ToYCbCr422PseudoPlanaru8( const uint8_t* __restrict src,                                  
                                        uint32_t                  srcWidth,
                                        uint32_t                  srcHeight,
                                        uint32_t                  srcStride,
                                        uint8_t* __restrict       dstY,
                                        uint8_t* __restrict       dstC,
                                        uint32_t                  dstYStride,
                                        uint32_t                  dstCStride );

        转换RGB 888到YUV (YCrCb) 4:2:0格式;

    2. 角点检测:

        FASTCV_API void
        fcvCornerFast9u8( const uint8_t* __restrict src,
                  unsigned int              srcWidth,
                  unsigned int              srcHeight,
                  unsigned int              srcStride,
                  int                       barrier,
                  unsigned int              border,
                  uint32_t* __restrict      xy,
                  unsigned int              nCornersMax,
                  uint32_t* __restrict      nCorners );
        此函数从可以从图像中提取较大的弯角,用来测试整个图像的角落,在连续段上9像素的像素环上寻找,
        此函数是一些列函数,相似函数有fcvCornerFast9InMasku8、fcvCornerFast10u8、fcvCornerHarrisu8等;
    3.仿射变换
        FASTCV_API int
        fcvGeomAffineEvaluatef32( const fcvCorrespondences* __restrict corrs,
                          float* __restrict                    affine,
                          float                                maxsqerr,
                          uint16_t* __restrict                 inliers,
                          int32_t*                             numinliers );

        此函数根据给定的数据评估仿射变换,检查误差小于给定的一个(maxSquErr);

    4.矩阵变换

        FASTCV_API fcvStatus
        fcvMultiplyScalars16( const int16_t * __restrict  src,
                      uint32_t srcWidth,
                      uint32_t srcHeight,
                      uint32_t srcStride,
                      int8_t  scalar,
                      int8_t shift,
                      int16_t * __restrict dst,
                      uint32_t  dstStride);
        此函数可以为矩阵中的每个元素增加一个标准矢量值。
        其他接口函数的含义,会在后续的博客中讲解分析。

你可能感兴趣的:(sdk,fastcv,Qualcomm,hexagon)