| | |
| | | Content string `json:"content"` |
| | | } |
| | | // 以摄像机id查出跟其相关的所有任务下的所有规则组 |
| | | func GetRuleGroup(cameraId string) []*protomsg.TaskGroupArgs { |
| | | func GetRuleGroup(cameraId string,taskId string) *protomsg.TaskGroupArgs { |
| | | all := cache.GetCameraTaskRulesByCameraId(cameraId) |
| | | return all |
| | | var taskGroup *protomsg.TaskGroupArgs |
| | | for _,task := range all { |
| | | if task.TaskId == taskId { |
| | | taskGroup = task |
| | | } |
| | | } |
| | | return taskGroup |
| | | } |
| | | // 根据摄像机id拿到摄像机所有区域 |
| | | func GetPolygons(cameraId string) []protomsg.CameraPolygon { |
| | |
| | | |
| | | // 给目标填充liker |
| | | func (arg *Arg) fillLiker() { |
| | | bytes := sdkcompare.GetComparePersonBaseInfo(nil, arg.Feature, 70) |
| | | bytes := sdkcompare.GetComparePersonBaseInfo(nil, arg.Feature, 40) |
| | | var m map[string]float32 |
| | | err1 := json.Unmarshal(bytes, &m) |
| | | if err1 != nil { |