panlei
2019-11-07 0e441dc5137776776d367f4075f7a2f62ae03628
ruleserver/readyDataForRule.go
@@ -285,11 +285,11 @@
   areaPoints := Json2points(a.AreaJson)
   logger.Info("看看图片的width和height:",arg.ImageWidth,arg.ImageHeight)
   widthScale := float64(arg.ImageWidth / 960)
   heigthScale := float64(arg.ImageHeight / 540)
   widthScale := float64(arg.ImageWidth) / 960
   heigthScale := float64(arg.ImageHeight) / 540
   for _, obj := range arg.Photo {
      //logger.Info("------------------看看sdkData:", arg.SdkName, "的Photo数据----------------", obj, "----顺便看看占比-----:", PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale))
      if threshold <= obj.Score && size <= float64(obj.Rects.Width*obj.Rects.Height) && intersectionper <= PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale) {
      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{}}