| | |
| | | "strconv" |
| | | "time" |
| | | ) |
| | | |
| | | var serverIp,serverPort,dbTablePersons string |
| | | |
| | | type conf struct { |
| | | PhotoUrl string `yaml:"photoUrl"` |
| | | VideoPersons string `yaml:"videoPersons"` |
| | |
| | | ServerPort string `yaml:"serverPort"` |
| | | DbTablePersons string `yaml:"dbTablePersons"` |
| | | } |
| | | |
| | | func Init() { |
| | | data, err := ioutil.ReadFile("./config/conf.yml") |
| | | if err != nil { |
| | |
| | | MonitorLevel string `json:"monitorLevel"` |
| | | Content string `json:"content"` |
| | | } |
| | | |
| | | // 以摄像机id查出跟其相关的所有任务下的所有规则组 |
| | | func GetRuleGroup(cameraId string,taskId string) *protomsg.TaskGroupArgs { |
| | | all := cache.GetCameraTaskRulesByCameraId(cameraId) |
| | |
| | | } |
| | | return taskGroup |
| | | } |
| | | |
| | | // 根据摄像机id拿到摄像机所有区域 |
| | | func GetPolygons(cameraId string) []protomsg.CameraPolygon { |
| | | var cameraPolygons []protomsg.CameraPolygon |
| | |
| | | } |
| | | return nil |
| | | } |
| | | |
| | | |
| | | // 根据传入的字符串得到其在一周内的索引 周一到周日分别对应1到7 |
| | | func getIndexOfWeek(weekday string) int { |
| | |
| | | if err != nil || len(table) == 0{ |
| | | logger.Error("根据id查询底库信息出错!",err,"--返回值长度为:",len(table)) |
| | | } |
| | | logger.Debug("看看这个base的对比值是多少:",Retain(m[baseinfo.Id]) * 100) |
| | | base := BaseInfo{TableId:baseinfo.TableId,TableName:table[0].TableName,BwType:table[0].BwType,CompareScore:Retain(m[baseinfo.Id])*100,PersonId:baseinfo.Id,PersonName:baseinfo.PersonName,PersonPicUrl:baseinfo.PersonPicUrl,PhoneNum:baseinfo.PhoneNum,Sex:baseinfo.Sex,IdCard:baseinfo.IdCard,MonitorLevel:baseinfo.MonitorLevel,Content:baseinfo.Reserved} |
| | | //logger.Debug("看看这个base的对比值是多少:",base) |
| | | //os.Exit(1) |
| | | arg.Liker = append(arg.Liker, &base) |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | // 人脸比对 |
| | | func Compare(args *SdkDatas, groupRule *protomsg.GroupRule) { |
| | | compareFlag := 0 |