| | |
| | | } |
| | | i := protomsg.Image{} |
| | | err = proto.Unmarshal(bdata, &i) |
| | | i1 := protomsg.Image{} |
| | | i1 = util.Subimg(i.Data, int(face.Location.X), int(face.Location.Y), int(face.Location.X+face.Location.Width), int(face.Location.Y+face.Location.Height)) |
| | | resp, err := util.PostFormBufferData(weedfsUrl, i1, uuid.NewV4().String()) |
| | | bytes := util.SubImg(i, int(face.Location.X), int(face.Location.Y), int(face.Location.X+face.Location.Width), int(face.Location.Y+face.Location.Height)) |
| | | resp, err := util.PostFormBufferData1(weedfsUrl, bytes, uuid.NewV4().String()) |
| | | if err != nil { |
| | | log.Println("上传小图出错") |
| | | } |
| | |
| | | msg.Cid, |
| | | msg.Caddr, |
| | | time.Now().Format("2006-01-02 15:04:05"), |
| | | bigPhotoUrl["fileUrl"].(string), |
| | | strings.Split(bigPhotoUrl["fileUrl"].(string), "/")[1], |
| | | msg.Tasklab.Taskid, |
| | | msg.Tasklab.Taskname, |
| | | face.SdkName, |
| | | "", |
| | | "", // 只检测,没有比对时间 |
| | | time.Now().Format("2006-01-02 15:04:05"), // 只检测,没有比对时间 |
| | | face.ThftRes.Gender, |
| | | face.ThftRes.Age, |
| | | "", |
| | |
| | | |
| | | } |
| | | err = EsReq("POST", "http://192.168.1.182:9200/videopersons/perVideoPicture", requstbody) |
| | | if err != nil { |
| | | log.Println("es can not execute right.") |
| | | } else { |
| | | log.Println("___________________________________往ES插入人脸数据成功") |
| | | } |
| | | log.Println(err) |
| | | }else { |
| | | log.Println("跟底库的相似数据---------:",face.Liker) |
| | | } |