panlei
2019-11-13 466947c1eeda6938ab6ef11497f6c8a96a574920
util/simpleCV.go
@@ -155,7 +155,6 @@
      }
   }
}
func DrawPolygonOnImageForYolo(cameraId string, img protomsg.Image, results []structure.Result,url string) (maps map[string]interface{}, err0 error) {
   rook, _ := gocv.NewMatFromBytes(int(img.Height), int(img.Width), gocv.MatTypeCV8UC3, img.Data)
@@ -169,6 +168,7 @@
   // 分割区域id集合并根据id查询区域然后画框
   for _,result := range results  {
      polygonIds := strings.Split(result.AlarmPolygon,",")
      logger.Info("区域ID:",result.AlarmPolygon,polygonIds)
      for i := 0; i < len(polygonIds); i++ {
         polygon := getPolygonById(polygonIds[i],cameraId)
         if polygon.Polygon != "[]" && polygon.Polygon != ""{