panlei
2019-07-02 393d4f7e51dd1298f6215e3958bc982711245224
ruleserver/ruleToformula.go
@@ -253,11 +253,10 @@
   for _, sdkData := range args.Sdkdata {
      for _, areaMap := range sdkData.AreaMapList {
         for j := 0; j < len(groupRule.Rules); j++ {
            putFaceToResult(groupRule.Rules[j], &areaMap, &faces)
            args.RuleResult["face"] = putFaceToResult(groupRule.Rules[j], &areaMap, faces)
         }
      }
   }
   args.RuleResult["face"] = faces
   // 再过其他数据 这步直接得到结果(真或假) 过目标数量
   for j := 0; j < len(groupRule.Rules); j++ {
      for _, sdkData := range args.Sdkdata {
@@ -353,15 +352,16 @@
   }
}
func putFaceToResult(rule *protomsg.Rule, am *AreaMap, faces *[]Arg) {
func putFaceToResult(rule *protomsg.Rule, am *AreaMap, faces []Arg) []Arg {
   if rule.SdkId == am.sdkId {
      if len(am.filterData) > 0 {
         for _, data := range am.filterData {
            log.Println("---------------------------------------------------------------------有这个data")
            *faces = append(*faces, data)
            faces = append(faces, data)
         }
      }
   }
   return faces
}
// 计算区域内的目标数量以及将相似度、占比、尺寸等打包