FastCV主要介面分析之一

2021-07-09 13:56:07 字數 2314 閱讀 9735

fastcv主要介面分析之一

安裝hexagon sdk後,會在安裝的主目錄下/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

fcvcorne***st9u8( 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畫素的畫素環上尋找,

此函式是一些列函式,相似函式有fcvcorne***st9inmasku8、fcvcorne***st10u8、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);

此函式可以為矩陣中的每個元素增加乙個標準向量值。

其他介面函式的含義,會在後續的部落格中講解分析。

分析函式之一

1.row number 的使用原表資訊 sql break on deptno skip 1 為效果更明顯,把不同部門的資料隔段顯示。sql select deptno,ename,sal 2from emp 3order by deptno,sal desc deptno ename sal 1...

Collection子介面之一 Set介面

一 set 儲存無序的 不可重複的資料 實現類 set介面中沒有額外定義新的方法,使用的時collection中的方法 要求 linkedhashset的使用 hashset說明 無序性 不等於隨機性。儲存的資料在底層陣列中並非按照陣列索引的順序新增,而是根據資料的雜湊值來決定的 不可重複性 保證新...

介面測試學習之一

說起介面測試首先要說的就是,什麼是介面?介面有哪幾種分類?為什麼要做介面測試?介面測試的重點是什麼呢?從哪些方面來思考如何進行介面測試呢?介面測試主要分為兩大類 外部介面和內部介面 外部介面 是指不同系統之間或者模組之間進行互動的介面 由測試人員進行測試 內部介面 是指 內部的介面 開發人員進行自測...