| | |
| | | if idx>-1 { |
| | | httpPicUrl = "http://"+localConf.WebPicIp+searchBody.PicUrl[idx:] |
| | | } else { |
| | | util.ResponseFormat(c, code.RequestParamError, "请重新上传图片") |
| | | util.ResponseFormat(c, code.RequestParamError, "图片路径有误,请重新上传图片") |
| | | return |
| | | } |
| | | logger.Debug("httpPicUrl:",httpPicUrl) |
| | | rb,err := util.ReadImgData(httpPicUrl) |
| | | if err !=nil { |
| | | util.ResponseFormat(c, code.RequestParamError, "请重新上传图片") |
| | | util.ResponseFormat(c, code.RequestParamError, "读取图片失败,请重新上传图片") |
| | | return |
| | | } |
| | | feaB, oriImg, smImgs, e := GetFeaFromOneFaceImg(rb) |
| | | if e !=nil { |
| | | util.ResponseFormat(c, code.RequestParamError, "请重新上传图片") |
| | | util.ResponseFormat(c, code.RequestParamError, "未提取到特征,请重新上传图片") |
| | | return |
| | | } else { |
| | | uploadImage = oriImg |