zhangmeng
2019-12-11 b4f22e68212f45aa685e27b2e83be5f82b3a8a3f
work/sdk/yolotrack.go
@@ -1,7 +1,6 @@
package sdk
import (
   "analysis/goconv"
   "analysis/logo"
   "analysis/work"
   "context"
@@ -54,7 +53,6 @@
   for {
      select {
      case <-ctx.Done():
         goconv.Free()
         return
      default:
@@ -100,12 +98,8 @@
   // conv to bgr24 and resize
   imgW, imgH := int(i.Width), int(i.Height)
   bgrData := goconv.YUV2BGR(i.Data, imgW, imgH)
   if bgrData == nil {
      ejectResult(nil, rMsg, out)
      return
   }
   img := gosdk.SDKImage{Data: bgrData, Width: imgW, Height: imgH}
   img := gosdk.SDKImage{Data: i.Data, Width: imgW, Height: imgH}
   v, ok := y.tracker[rMsg.Msg.Cid]
   if !ok {
@@ -152,7 +146,6 @@
      id, name = rMsg.Msg.Tasklab.Taskid, rMsg.Msg.Tasklab.Taskname
   }
   logo.Infoln("CAMERAID: ", rMsg.Msg.Cid, " TASKID: ", id, " TASKNAME: ", name, " DETECT YOLO COUNT: ", len(allO))
}
func convert2ProtoYoloTrack(obj []gosdk.CObjTrackInfo, fx, fy float64) []*protomsg.ObjInfo {