| | |
| | | for _, areaMap := range sdkData.AreaMapList { |
| | | targets = append(targets,areaMap.AlarmObj...) |
| | | for _,obj := range areaMap.AlarmObj { |
| | | logger.Info("个体静止的目标",obj.Id,obj.Location) |
| | | logger.Info("个体静止的目标",obj.Id,obj.Location,obj.CacheData) |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | logger.Debug("------locations的内容:", yolos) |
| | | // 处理目标定时数据 |
| | | //targets := []*structure.Arg{} |
| | | //for _, sdkData := range args.Sdkdata { |
| | | // if sdkData.IpcId == "02D54B61-0F16-C604-8567-FC4BE493C523" && sdkNames != "" { // 把yolo数据的各个目标的坐标输出方便后面画框 |
| | | // for _, areaMap := range sdkData.AreaMapList { |
| | | // if areaMap.IsEffective { |
| | | // yolos = append(yolos, putTargetsToResult(areaMap)...) |
| | | // } |
| | | // } |
| | | // } |
| | | //} |
| | | var islink bool |
| | | if groupRule.SetType == "linkTask" { |
| | | islink = true |
| | |
| | | //logger.Info("-------------------face结果标签", len(args.RuleResult["face"].([]FaceResult))) |
| | | labelTypes = append(labelTypes,1) |
| | | } |
| | | //if len(targets) > 0 { |
| | | // args.RuleResult["target"] = append(args.RuleResult["target"].([]structure.Result), structure.Result{taskId, sdkNames, groupRule.GroupId, groupRule.DefenceState, groupRule.AlarmLevel, groupRule.GroupText, targets, polygonId, islink,label}) |
| | | // //logger.Info("-------------------目标持续结果标签", len(args.RuleResult["face"].([]FaceResult))) |
| | | // //labelTypes = append(labelTypes,2) |
| | | //} |
| | | // 给持续时间的第一张赋予缓存数据(遍历复制) |
| | | if cacheId != "" { // 有这帧数据的缓存 |
| | | tempMap := make(map[string]interface{}) |
| | |
| | | //logger.Println("-----------------------------------------------听说你是空的?",faces) |
| | | return locations |
| | | } |
| | | |
| | | func putTargetsToResult(am *structure.AreaMap) []*structure.Arg { |
| | | locations := []*structure.Arg{} |
| | | if len(am.AlarmObj) > 0 { |
| | | locations = am.AlarmObj |
| | | } |
| | | //logger.Println("-----------------------------------------------听说你是空的?",faces) |
| | | return locations |
| | | } |
| | | // 联动任务的处理 |
| | | func LinkTask(args *structure.SdkDatas, groupRule *protomsg.GroupRule, taskId string, message *protomsg.SdkMessage, label structure.Others) { |
| | | // new一个定时器,如果以此groupId为标志的定时器不存在的话 |