| | |
| | | |
| | | import ( |
| | | "basic.com/dbapi.git" |
| | | bigCache "basic.com/pubsub/cache.git" |
| | | "basic.com/pubsub/protomsg.git" |
| | | "encoding/json" |
| | | "errors" |
| | |
| | | if err1 != nil { |
| | | logger.Error("查询本机信息失败!") |
| | | } |
| | | logger.Debug("本机信息和server信息:", localConfig, serverIp, serverPort) |
| | | bigCache.Init(dbTablePersons, serverIp, serverPort, localConfig.ServerId) |
| | | //logger.Debug("本机信息和server信息:", localConfig, serverIp, serverPort) |
| | | //bigCache.Init(dbTablePersons, serverIp, serverPort, localConfig.ServerId) |
| | | go Push1() |
| | | } |
| | | |
| | |
| | | func GetPolygons(cameraId string) []protomsg.CameraPolygon { |
| | | var cameraPolygons []protomsg.CameraPolygon |
| | | cameraPolygons = cache.GetPolygonsByCameraId(cameraId) |
| | | //logger.Debug("------=======查看下全部区域:",cameraPolygons) |
| | | logger.Debug("------=======查看下全部区域:",cameraPolygons) |
| | | return cameraPolygons |
| | | } |
| | | |
| | |
| | | func (a *AreaMap) CountAreaObjs(arg *SdkData) { |
| | | |
| | | a.targetNum = 0 |
| | | threshold := 0.8 // 相似度 |
| | | threshold := 80.0 // 相似度 |
| | | intersectionper := 0.2 // 占比 |
| | | size := 0.0 // 尺寸 |
| | | |