panlei
2019-11-13 732d0c9d92acde9b4de607f511af1d0e7500f3cb
ruleserver/readyDataForRule.go
@@ -8,6 +8,7 @@
   "errors"
   "fmt"
   "github.com/golang/protobuf/proto"
   uuid "github.com/satori/go.uuid"
   "math"
   "nanomsg.org/go-mangos"
   "nanomsg.org/go-mangos/protocol/req"
@@ -273,7 +274,8 @@
      if  obj.Score >= threshold && float64(obj.Rects.Width*obj.Rects.Height) >= size && PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale) >= intersectionper {
         // 这步要备齐表达式里所需要的所有参数
         a.TargetNum++
         arg1 := structure.Arg{obj.Id,obj.Score, PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale), float64(obj.Rects.Width * obj.Rects.Height), obj.IsYolo, obj.Rects, obj.Feature, obj.ThftRes, []*structure.BaseInfo{},nil}
         uuid := uuid.NewV4().String()
         arg1 := structure.Arg{obj.Id,uuid,obj.Score, PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale), float64(obj.Rects.Width * obj.Rects.Height), a.AreaJson,obj.IsYolo, obj.Rects, obj.Feature, obj.ThftRes, []*structure.BaseInfo{},structure.ResultMsg{}}
         //logger.Println("放进去的arg:-------", arg1)
         a.Args = append(a.Args, &arg1)
         a.FilterData = append(a.FilterData, &arg1)
@@ -281,8 +283,6 @@
   }
   logger.Info("区域是:",areaPoints,"区域内目标数量为:",a.TargetNum,"---",len(a.FilterData))
   a.Time = time.Unix(time.Now().Unix(), 0).String()[11:16]
   a.KeepRight = arg.KeepRight
   a.IsStatic = arg.IsStatic
   //logger.Println("--------------------看看区域数据:",*a)
}