panlei
2019-07-15 6778d033d1659069119cd0fb7fc5947b29c1cd5e
扩大全部区域判断范围
1个文件已删除
1个文件已添加
1个文件已修改
41 ■■■■■ 已修改文件
labelFilter/labelFilter.go 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruleprocess 补丁 | 查看 | 原始文档 | blame | 历史
ruleserver/ruleToformula.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
labelFilter/labelFilter.go
New file
@@ -0,0 +1,39 @@
package labelFilter
import (
    "basic.com/pubsub/protomsg.git"
    "ruleprocess/cache"
    "ruleprocess/logger"
    "ruleprocess/ruleserver"
)
type Label struct {
    CameraId      string
    CameraName    string
    CameraAddr    string
    TaskId        string
    Persons       []*Person
    DefenceLevel  string
}
type Person struct {
    Id     string
    Level  string
    Gender string
    Age    int
    Race   string
    Likers []*protomsg.Baseinfo
}
func DataFormatToLabel(result ruleserver.ResultMsg) Label {
    labelData := Label{}
    labelData.CameraId = result.Cid
    camera, err := cache.GetCameraById(result.Cid)
    if err != nil {
        logger.Error("查询摄像机信息出错")
    }
    labelData.CameraName = camera.Name
    labelData.CameraAddr = camera.Addr
    labelData.TaskId = result.Tasklab.Taskid
    return Label{}
}
ruleprocess
Binary files differ
ruleserver/ruleToformula.go
@@ -628,7 +628,7 @@
// 将字符串格式的坐标序列化为Point格式
func Json2points(areaPoints string) []Point {
    var pts []Point
    if areaPoints == "[]" {
    if areaPoints == "[]" || areaPoints == ""{
        logger.Error("=====================此区域为全部区域")
        pts = append(pts, Point{0, 0})
        pts = append(pts, Point{0, 540})