| | |
| | | } |
| | | // 判断一个区域内有没有静止的目标 |
| | | func CompareAndSave(rule *protomsg.Rule, am *structure.AreaMap,lable *structure.Others,args *structure.SdkDatas,message *protomsg.SdkMessage) structure.LittleRuleResult { |
| | | initN := 60 |
| | | if rule.SdkId == "个体静止" && rule.SdkArgAlias == "duration" { |
| | | initN := 5 |
| | | if rule.SdkId == "812b674b-2375-4589-919a-5c1c3278a977" && rule.SdkArgAlias == "duration" { |
| | | if init,err := strconv.Atoi(rule.SdkArgValue); err != nil { |
| | | logger.Debug("个体静止算法读取持续时间失败",err) |
| | | } else { |
| | |
| | | if singleResult { |
| | | flag = "true" |
| | | tars = append(tars,arg) |
| | | logger.Info("静止的目标:",arg.Id,arg.Location,arg.Score) |
| | | } |
| | | } |
| | | |
| | | // 把满足条件的目标放进areaMap中 |
| | | am.AlarmObj = tars |
| | | // 更新数据,把新来的数据写入缓存 |