| | |
| | | urlArr = append(urlArr, weedFilePath) |
| | | } |
| | | } |
| | | //2.大图画框 |
| | | //2.大图画框,标识人脸位置 |
| | | originFilePath, _ := WeedFSClient.UploadFile(weedfsUri, "FaceUrl", fileBytes) |
| | | resultMap["uploadImage"] = originFilePath |
| | | resultMap["smImage"] = urlArr |
| | |
| | | photoUrl := c.Request.FormValue("url") |
| | | tableId := c.Request.FormValue("tableId")//底库id |
| | | compThresholdStr := c.Request.FormValue("compThreshold")//比对阈值 |
| | | compThreshold, err := strconv.Atoi(compThresholdStr) |
| | | compThreshold, err := strconv.ParseFloat(compThresholdStr,32) |
| | | if photoUrl == "" || err != nil { |
| | | util.ResponseFormat(c, code.RequestParamError, "参数有误") |
| | | return |
| | |
| | | return |
| | | } else { |
| | | arg := protomsg.CompareArgs{ |
| | | TableIds:[]string{ tableId }, |
| | | FaceFeature:face.FaceBytes, |
| | | CompareThreshold:float32(compThreshold), |
| | | } |
| | | if tableId !=""{ |
| | | arg.TableIds = []string{ tableId } |
| | | } |
| | | b, err := proto.Marshal(&arg) |
| | | if err !=nil{ |
| | | util.ResponseFormat(c, code.ComError, "请求marshal失败") |