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);
        此函數可以爲矩陣中的每個元素增加一個標準矢量值。
        其他接口函數的含義,會在後續的博客中講解分析。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章