Video Analysis底层库拆分,sdk的go封装
chenshijun
2019-07-12 82cdc5963540891a419b45fccc340294c6fc1184
gosdk.go
@@ -217,7 +217,7 @@
   }
}
func FaceInfo2FacePos(face CFaceInfo) (fPos CFacePos){
func FaceInfo2FacePos(face CFaceInfo) (fPos CFacePos) {
   fPos.RcFace = face.RcFace
   fPos.PtLeftEye = face.PtLeftEye
   fPos.PtRightEye = face.PtRightEye
@@ -241,14 +241,14 @@
   var fCount C.int
   cFinfo := C.c_api_face_track(&fCount, (*C.uchar)(unsafe.Pointer(&data[0])), C.int(w), C.int(h), C.int(ch))
   fmt.Println("cFinfo detected:",cFinfo)
   fmt.Println("cFinfo detected:", cFinfo)
   if cFinfo == nil {
      return faces
   }
   defer C.free(unsafe.Pointer(cFinfo))
   faces = CFaceInfoArrayToGoArray(unsafe.Pointer(cFinfo), int(fCount))
   //if len(faces) > 0{
      fmt.Println("faces detected:",len(faces))
   fmt.Println("faces detected:", len(faces))
   //}
   return faces
@@ -326,12 +326,6 @@
   var tmp CObjTrackInfo
   //LastYoloObjs
   detectObjs := YoloDetect(handle, img, thrsh, umns)
   for i := 0; i < len(detectObjs); i++ {
      if detectObjs[i].Typ != 0 {
         detectObjs = append(detectObjs[:i], detectObjs[i+1:]...) //从检测目标里删除已经查到的跟踪目标
         i--
      }
   }
   for _, vLast := range LastYoloObjs {
      for i := 0; i < len(detectObjs); i++ {