From 0541661d3e4a063d4e68b33e4d6dbb71d3b58638 Mon Sep 17 00:00:00 2001
From: chenshijun <chenshijun@aiotlink.com>
Date: 星期三, 09 九月 2020 09:48:15 +0800
Subject: [PATCH] 添加人脸质量的so

---
 go2c.go |  135 +++++++++++++++++++++++++++++++++++++-------
 1 files changed, 113 insertions(+), 22 deletions(-)

diff --git a/go2c.go b/go2c.go
index 6431f48..bddd7ea 100644
--- a/go2c.go
+++ b/go2c.go
@@ -54,12 +54,23 @@
 	PFacialData [8192]uint8
 	NFaceID     int64
 }
+type CThfqParam struct {
+	Brightness_min int32 //0-100锛屽お鏆楅槇鍊�,寤鸿25.瓒婂皬瓒婂彲鑳芥妸杩囨殫鐨勪汉鑴稿綋浣滄甯镐汉鑴革紝姝ゅ弬鏁颁細褰卞搷THFQ_Result::brightness
+	Brightness_max int32 //0-100锛屽お浜槇鍊�,寤鸿75.瓒婂ぇ瓒婂彲鑳芥妸鐨勮繃浜汉鑴稿綋浣滄甯镐汉鑴革紝姝ゅ弬鏁颁細褰卞搷THFQ_Result::brightness
+}
+type CThfqResult struct {
+	Brightness int32 //浜鸿劯浜害锛屽彧鏈�3绉嶅彲鑳界殑鍊�:[-1->澶殫锛�0->姝e父锛�1->澶寒]锛屼寒搴︾粨鏋滀細鍙椾寒搴﹂槇鍊煎弬鏁癰rightness_min鍜宐rightness_max褰卞搷
+	Occlusion  int32 //浜鸿劯閬尅搴︼紝鑼冨洿鍊间负0-100,瓒婂ぇ琛ㄧず浜鸿劯閬尅绋嬪害瓒婇珮
+	Hat        int32 //甯﹀附瀛�,鑼冨洿涓�0-100锛岃秺澶ц〃绀鸿秺鍙兘鏈変僵鎴村附瀛愶紝寤鸿鍒ゅ埆闃堝�间负50
+	Blur       int32 //浜鸿劯妯$硦搴�,鑼冨洿鍊间负0-100,瓒婂ぇ琛ㄧず鍥惧儚瓒婃ā绯婏紝寤鸿浜鸿劯妯$硦搴﹀垽鍒槇鍊间负70
+	Glasses    int32 //甯︾溂闀�,鑼冨洿涓�0-100锛岃秺澶ц〃绀鸿秺鍙兘鏈夋埓鐪奸暅锛屽缓璁垽鍒槇鍊间负70
+}
+
 type CObjInfo struct {
 	RcObj CRECT
 	Typ   int32
 	Prob  float32
 }
-
 //track yolo objs info
 type CObjTrackInfo struct {
 	ObjInfo CObjInfo
@@ -67,6 +78,8 @@
 }
 
 type CPlateIDCfg struct {
+	FastMemorySize int32 // DSP绛夌殑鐗囧唴鍐呭瓨澶у皬 鍗曚綅K
+	MemorySize     int32 // 鏅�氬唴瀛樺ぇ灏� 鍗曚綅 M
 	MinPlateWidth  int32 // 妫�娴嬬殑鏈�灏忚溅鐗屽搴︼紝浠ュ儚绱犱负鍗曚綅
 	MaxPlateWidth  int32 // 妫�娴嬬殑鏈�澶ц溅鐗屽搴︼紝浠ュ儚绱犱负鍗曚綅
 	MaxImageWidth  int32 // 鏈�澶у浘鍍忓搴�
@@ -100,27 +113,105 @@
 }
 
 type CPlateIDResult struct {
-	License [16]uint8
-	Color   [8]uint8
+	License [16]uint8 // 杞︾墝瀛楃涓� STRING
+	Color   [8]uint8  // 杞︾墝棰滆壊 STRING
 
-	NColor      int32
-	NType       int32
-	NConfidence int32
-	NBright     int32
-	NDirection  int32
+	NColor      int32 // 杞︾墝棰滆壊
+	NType       int32 // 杞︾墝绫诲瀷
+	NConfidence int32 // 鏁寸墝鍙俊搴�
+	NBright     int32 // 浜害璇勪环
+	NDirection  int32 // 杞︾墝杩愬姩鏂瑰悜锛�0 unknown, 1 left, 2 right, 3 up, 4 down
 
-	RcLocation          CRECT
-	PbyBits             [4]uint8
-	NTime               int32
-	NCarBright          uint8
-	NCarColor           uint8
-	NCarLogo            uint8
-	NCarType            uint8
-	PbyPlateBin         [4]uint8
-	NBinPlateWidth      [2]uint8
-	NBinPlateHeight     [2]uint8
-	Reserved            [70]uint8
-	RcLogoLocation      CRECT
-	NCarModel           [2]uint8
-	NCarModelConfidence [2]uint8
+	RcLocation          CRECT     // 杞︾墝鍧愭爣
+	PbyBits             [4]uint8  // 璇嗗埆缁撴灉瀵瑰簲鐨勫浘鐗囩殑缂撳啿鍖� NO USE
+	NTime               int32     // 璇嗗埆鑰楁椂
+	NCarBright          uint8     // 杞︾殑浜害
+	NCarColor           uint8     // 杞︾殑棰滆壊
+	NCarLogo            uint8     // 杞︽爣绫诲瀷
+	NCarType            uint8     // 杞﹁締绫诲瀷
+	PbyPlateBin         [4]uint8  // 杞︾墝浜屽�煎寲缁撴灉锛堟寜bit瀛樺偍锛塏O USE
+	NBinPlateWidth      [2]uint8  // 浜屽�煎寲缁撴灉涓溅鐗屽搴� NO USE
+	NBinPlateHeight     [2]uint8  // 浜屽�煎寲缁撴灉涓溅鐗岄珮搴� NO USE
+	Reserved            [70]uint8 // 淇濈暀
+	RcLogoLocation      CRECT     // 杞︽爣鍧愭爣
+	NCarModel           [2]uint8  // 杞﹁締绫诲瀷
+	NCarModelConfidence [2]uint8  // 杞﹀瀷鍙俊搴�
+}
+
+type CPlateIDCloudCfg struct {
+	NImageMode int32 //0锛氫负甯фā寮� 1锛氫负鍦烘ā寮�
+	NRecMode   int32 //璇嗗埆妯″紡锛�0锛氬崟寮犲浘鐗囪瘑鍒紝1:瑙嗛妫�娴�+璇嗗埆锛�2锛氳棰戝甯ц瀺鍚堣瘑鍒�(娉細1妯″紡姣�2妯″紡蹇紝浣嗚瘑鍒巼鍜屾崟鑾风巼姣�2浣�)
+
+	NMinPlateWidth int32 //璇嗗埆鏈�灏忚溅鐗屽搴�
+	NMaxPlateWidth int32 //璇嗗埆鏈�澶ц溅鐗屽搴�
+
+	NImageWidth  int32 //鍥剧墖瀹藉害
+	NImageHeight int32 //鍥剧墖楂樺害
+
+	NMinHorAngle int32
+	NMaxHorAngle int32 //姘村钩鐭瑙掑害鑼冨洿锛屾敮鎸佹渶澶ц搴︿负[-30掳锛�30掳]
+	NMinVerAngle int32
+	NMaxVerAngle int32 //鍨傜洿鐭瑙掑害鑼冨洿锛屾敮鎸佹渶澶ц搴︿负[-30掳锛�30掳]
+
+	//姝や簺椤归拡瀵硅溅鍨嬭瘑鍒湁鐢紝鍏朵綑鏃犵敤
+	FExpLeftRightR float32 //杞﹁劯宸﹀彸鎵╁厖(杞︾墝鐨勫搴�)鍊嶆暟 鍙傝�冨�间负1.6
+	FExpTopR       float32 //杞﹁劯涓婇儴鎵╁厖(杞︾墝鐨勯珮搴�)鍊嶆暟 鍙傝�冨�间负6.0
+	FExpBottomR    float32 //杞﹁劯涓嬮儴鎵╁厖(杞︾墝鐨勯珮搴�)鍊嶆暟 鍙傝�冨�间负1.5
+}
+
+type CPlateIDCloudResult struct {
+	License     [20]uint8 //璇嗗埆缁撴灉
+	RcLocation  CRECT     //杞︾墝浣嶇疆
+	X           [4]int32
+	Y           [4]int32
+	NConfidence int32 //杞︾墝缃俊搴�
+	NType       int32 //杞︾墝绫诲瀷
+	NDirection  int32 //杞﹁締杩愬姩鏂瑰悜 0锛氭湞杩戣繍鍔紝1锛氭湞杩滆繍鍔紝-1锛氭湭鐭�
+	NCarColor   int32 //杞﹁韩涓婚鑹�
+	NCarColor1  int32 //杞﹁韩娆¢鑹�
+	NBright     int32 //杞﹁締娣辨祬鑹�
+	PResultBits int32 //瑙嗛璇嗗埆妯″紡涓姄鎷嶇殑鍥剧墖,瑙嗛妯″紡璇嗗埆涓嬫湁鏁堬紝闇�瑕佸紑杈�
+
+	FramNo int32    //瑙嗛妯″紡涓嬪抚鍙�
+	Time   [7]int32 //瑙嗛璇嗗埆妯″紡涓姄鎷嶆寮犲浘鐨勬椂闂�
+
+	//閽堝杞﹁劯璇嗗埆搴旂敤姝ら」锛屽叾浣欐棤鐢�
+	FaceImage    int32 //瀵瑰簲鐨勮溅鑴哥殑鍥剧墖,闇�瑕佹彁鍓嶅紑杈熷唴瀛橈紝寮�杈熶釜鏈�澶у唴瀛樺氨鍙互锛屽楂樺彲浠ラ兘涓�1000
+	FaceWidth    int32 //杞﹁劯瀹藉害
+	FaceHeight   int32 //杞﹁劯楂樺害
+	GrayFaceFlag int32 //杞﹁劯鏄惁涓虹伆搴﹀浘
+
+	CharLocation   [20]CRECT //杞︾墝瀛楃鐨勪綅缃�(鍩轰簬澶у浘)
+	CharConfidence [20]CRECT //瀛楃璇嗗埆缃俊搴�
+	CharNum        int32     //杞︾墝瀛楃鏁扮洰
+}
+
+type CVehicleITSResult struct {
+	NPlateFlag      int32     //鏄惁璇嗗埆鍒拌溅鐗�
+	NColor          int32     //杞﹁締棰滆壊
+	NType           int32     //杞﹁締绫诲瀷
+	License         [20]uint8 //杞︾墝鍙风爜
+	NConfidence     int32     // 杞︾墝鍙俊搴�
+	NCharNum        int32     // 鏈煡
+	NCharConfidence [20]int32 // 鏈煡
+
+	RcLocation    CRECT //杞︾墝浣嶇疆
+	RcCarLocation CRECT //杞﹁締浣嶇疆
+
+	VehicleType  [1024]uint8 //杞﹁締绫诲瀷 --鎬诲悕绉�  jeep-澶у垏璇哄熀-2004
+	VehicleBrand [1024]uint8 //杞﹁締鍝佺墝 --jeep
+	VehicleSub   [1024]uint8 //杞﹁締瀛愬瀷鍙� --澶у垏璇哄熀
+	VehicleType1 [1024]uint8 //杞﹁締绫诲瀷   杞胯溅 璐ц溅  瀹㈣溅  闈㈠寘杞�
+
+	FVDConf    float32 //杞﹁締妫�娴嬬疆淇″害
+	FConfdence float32 //杞﹁締绫诲瀷缃俊搴�
+
+	NVehicleSubModel int32 //杞﹀瀷鍚嶇О绱㈠紩
+	NVehicleBright   int32 //杞﹁締娣辨祬鑹�
+	NVehicleColor1   int32 //杞﹁韩涓婚鑹�
+	NVehicleColor2   int32 //杞﹁韩杈呴鑹�
+
+	PCaptureImage [4]uint8 //瑙嗛妯″紡璇嗗埆涓嬫姄鎷嶇殑鍥剧墖鏁版嵁
+	NImageWidth   int32    //瑙嗛妯″紡涓嬫姄鎷嶅浘鍍忓搴�
+	NImageHeight  int32    //瑙嗛妯″紡涓嬫姄鎷嶅浘鍍忛珮搴�
 }

--
Gitblit v1.8.0