| | |
| | | package main |
| | | |
| | | import ( |
| | | "encoding/base64" |
| | | "encoding/json" |
| | | "errors" |
| | | "net" |
| | |
| | | "strconv" |
| | | "time" |
| | | |
| | | "basic.com/valib/logger.git" |
| | | "github.com/golang/protobuf/proto" |
| | | "github.com/satori/go.uuid" |
| | | "basic.com/valib/logger.git" |
| | | |
| | | "ruleprocess/cache" |
| | | "ruleprocess/structure" |
| | | "basic.com/pubsub/protomsg.git" |
| | | "basic.com/pubsub/esutil.git" |
| | | "basic.com/pubsub/protomsg.git" |
| | | "ruleprocess/cache" |
| | | "ruleprocess/ruleserver" |
| | | "ruleprocess/structure" |
| | | "ruleprocess/util" |
| | | ) |
| | | |
| | |
| | | target.TargetId = face.Id |
| | | target.TargetScore = face.Score |
| | | target.TargetType = face.Type |
| | | target.Feature = base64.StdEncoding.EncodeToString(face.Feature) |
| | | target.Feature = face.Feature |
| | | target.PicSmUrl = resp["fileUrl"].(string) |
| | | target.TargetLocation = Points{TopLeft: Point{face.Location.X, face.Location.Y}, BottomRight: Point{face.Location.X + face.Location.Width, face.Location.Y + face.Location.Height}} |
| | | target.AttachTarget = SourceTarget{face.AttachArg.Id,face.AttachArg.Score,face.AttachArg.Type,base64.StdEncoding.EncodeToString(face.AttachArg.Feature),"",Points{TopLeft: Point{face.AttachArg.Location.X, face.AttachArg.Location.Y}, BottomRight: Point{face.AttachArg.Location.X + face.AttachArg.Location.Width, face.AttachArg.Location.Y + face.AttachArg.Location.Height}}} |
| | | target.AttachTarget = SourceTarget{face.AttachArg.Id,face.AttachArg.Score,face.AttachArg.Type,face.AttachArg.Feature,"",Points{TopLeft: Point{face.AttachArg.Location.X, face.AttachArg.Location.Y}, BottomRight: Point{face.AttachArg.Location.X + face.AttachArg.Location.Width, face.AttachArg.Location.Y + face.AttachArg.Location.Height}}} |
| | | var targetInfos []Target |
| | | targetInfos = append(targetInfos, *target) |
| | | |
| | |
| | | case "plate": |
| | | sdkname = "车牌识别" |
| | | case "track": |
| | | sdkname = "人员跟踪" |
| | | sdkname = "跟踪" |
| | | logger.Info("数据到了此处") |
| | | if len(face.Liker) == 1{ |
| | | id = face.Liker[0].TargetId |
| | | } |