Video Analysis底层库拆分,sdk的go封装
zhangmeng
2019-11-15 4d025c4a8c81c0bfdd159586528db0af72e6a6d6
go2c.go
@@ -4,58 +4,125 @@
package gosdk
type CPOINT struct {
   X   int32
   Y   int32
   X int32
   Y int32
}
type CRECT struct {
   Left   int32
   Top   int32
   Right   int32
   Bottom   int32
   Left   int32
   Top    int32
   Right  int32
   Bottom int32
}
type CIMAGE struct {
   Data      *uint8
   Width      int32
   Height      int32
   Channel      int32
   Pad_cgo_0   [4]byte
   Data      *uint8
   Width     int32
   Height    int32
   Channel   int32
   Pad_cgo_0 [4]byte
}
type CFaceAngle struct {
   Yaw      int32
   Pitch      int32
   Roll      int32
   Confidence   float32
   Yaw        int32
   Pitch      int32
   Roll       int32
   Confidence float32
}
type CThftResult struct {
   Gender      int32
   Age      int32
   Race      int32
   Beauty_level   int32
   Smile_level   int32
   Gender       int32
   Age          int32
   Race         int32
   Beauty_level int32
   Smile_level  int32
}
type CFacePos struct {
   RcFace      CRECT
   PtLeftEye   CPOINT
   PtRightEye   CPOINT
   PtMouth      CPOINT
   PtNose      CPOINT
   FAngle      CFaceAngle
   NQuality   int32
   PFacialData   [512]uint8
   RcFace      CRECT
   PtLeftEye   CPOINT
   PtRightEye  CPOINT
   PtMouth     CPOINT
   PtNose      CPOINT
   FAngle      CFaceAngle
   NQuality    int32
   PFacialData [512]uint8
}
type CFaceInfo struct {
   RcFace      CRECT
   PtLeftEye   CPOINT
   PtRightEye   CPOINT
   PtMouth      CPOINT
   PtNose      CPOINT
   FAngle      CFaceAngle
   NQuality   int32
   PFacialData   [8192]uint8
   NFaceID      int64
   RcFace      CRECT
   PtLeftEye   CPOINT
   PtRightEye  CPOINT
   PtMouth     CPOINT
   PtNose      CPOINT
   FAngle      CFaceAngle
   NQuality    int32
   PFacialData [8192]uint8
   NFaceID     int64
}
type CObjInfo struct {
   RcObj   CRECT
   Typ   int32
   Prob   float32
   RcObj CRECT
   Typ   int32
   Prob  float32
}
//track yolo objs info
type CObjTrackInfo struct {
   ObjInfo CObjInfo
   ID      uint64
}
type CPlateIDCfg struct {
   FastMemorySize int32 // DSP等的片内内存大小 单位K
   MemorySize     int32 // 普通内存大小 单位 M
   MinPlateWidth  int32 // 检测的最小车牌宽度,以像素为单位
   MaxPlateWidth  int32 // 检测的最大车牌宽度,以像素为单位
   MaxImageWidth  int32 // 最大图像宽度
   MaxImageHeight int32 // 最大图像高度
   IsFieldImage   uint8 // 是否是场图像
   MovingImage    uint8 // 识别运动or静止图像
   OrderOpt       uint8 // 输出顺序选项 0-置信度 1-自上而下 2-自下而上
   LeanCorrection uint8 // 是否启用车牌旋转功能,默认开启
   ImproveSpeed   uint8 // 0: 识别率优先 1:识别速度优先
   CarLogo        uint8 // 0: 不检测车标 1: 检测车标
   LotDetect      uint8 // 0: 不检测车位 1: 检测车位
   Shadow         uint8 // 0: 针对无阴影的车牌 1:针对有阴影的车牌,默认开启
   ShieldRailing  uint8 // 0: 屏蔽栏杆干扰, 1:不屏蔽栏杆干扰
   CarModel       uint8 // 0: 不识别车型, 1: 识别车型
   LocateTh       uint8 // 车牌定位阈值
   OCRTh          uint8 // 车牌识别阈值
   Individual       uint8 // 个性化车牌开启
   TwoRowYellow     uint8 // 双层黄色车牌开启
   ArmPolice        uint8 // 单层武警车牌开启
   ArmPolice2       uint8 // 双层武警车牌开启
   TwoRowArmy       uint8 // 双层军队车牌开启
   Tractor          uint8 // 农用车车牌开启
   Embassy          uint8 // 使馆车牌开启
   ChangNei         uint8 // 厂内车牌开启
   MinHang          uint8 // 民航车牌开启
   Consulate        uint8 // 领事馆车牌开启
   NewEnergy        uint8 // 新能源车牌开启
   OnlyTwoRowYellow uint8 // 只识别双层黄牌开启
   OnlyLocation     uint8 // 只定位车牌开启
}
type CPlateIDResult struct {
   License [16]uint8 // 车牌字符串 STRING
   Color   [8]uint8  // 车牌颜色 STRING
   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  // 识别结果对应的图片的缓冲区 NO USE
   NTime               int32     // 识别耗时
   NCarBright          uint8     // 车的亮度
   NCarColor           uint8     // 车的颜色
   NCarLogo            uint8     // 车标类型
   NCarType            uint8     // 车辆类型
   PbyPlateBin         [4]uint8  // 车牌二值化结果(按bit存储)NO USE
   NBinPlateWidth      [2]uint8  // 二值化结果中车牌宽度 NO USE
   NBinPlateHeight     [2]uint8  // 二值化结果中车牌高度 NO USE
   Reserved            [70]uint8 // 保留
   RcLogoLocation      CRECT     // 车标坐标
   NCarModel           [2]uint8  // 车辆类型
   NCarModelConfidence [2]uint8  // 车型可信度
}