From 355284a3ac944515951d4c2a7ec5d3964fb13857 Mon Sep 17 00:00:00 2001 From: panlei <2799247126@qq.com> Date: 星期四, 31 十月 2019 13:48:29 +0800 Subject: [PATCH] 把人体追踪从es最前改为放在规则最后 --- ruleserver/personTrack.go | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ruleserver/personTrack.go b/ruleserver/personTrack.go index a330231..dc69af8 100644 --- a/ruleserver/personTrack.go +++ b/ruleserver/personTrack.go @@ -3,7 +3,8 @@ import ( "basic.com/pubsub/protomsg.git" "github.com/golang/protobuf/proto" - "ruleprocess/logger" + "basic.com/valib/logger.git" + "ruleprocess/structure" ) var TrackPond = make(map[string]*PersonTrack) @@ -104,8 +105,8 @@ return false } func TrackOrNot(label map[string]interface{}) bool{ - if label["yolo"] != nil && len(label["yolo"].([]Result)) > 0 { - for _,res := range label["yolo"].([]Result) { + if label["yolo"] != nil && len(label["yolo"].([]structure.Result)) > 0 { + for _,res := range label["yolo"].([]structure.Result) { if res.TimeLabel == "10" { return true } @@ -115,7 +116,7 @@ } // 杩囨护鎺夐偅浜涘凡鍦ㄧ紦瀛樹腑涓斿垎鍊兼洿浣庣殑浜鸿劯锛屾洿鏂扮紦瀛橈紙娌℃湁鐨勫姞涓婏紝鍒嗗�兼洿鏂颁负鏇撮珮鐨勶紝澶氱殑鍒犻櫎锛� -func FaceIsInPond(cameraId string, sdkinfor *protomsg.SdkmsgWithTask) string { +func FaceIsInPond(cameraId string, sdkinfor *protomsg.SdkmsgWithTask) { if TrackPond[cameraId] != nil { logger.Info("----椹墠鐐細", TrackPond[cameraId], "=====", len(TrackPond[cameraId].Faces)) for _,face := range TrackPond[cameraId].Faces { @@ -183,7 +184,6 @@ } } } else { - return "false" + TrackPond[cameraId] = &PersonTrack{Faces: nil} } - return "false" } -- Gitblit v1.8.0