摄像头管理页面增删改查成功
commit
8ef0887800
|
@ -107,8 +107,13 @@ public class CompareServiceImpl implements ICompareService {
|
|||
if (compareRequestVo.getUrlList().size() != comparePicSize) {
|
||||
throw new DkException("请上传1:1比对的两张图片");
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
// String apiUrl = apiServerPrefix + ApiUrlEnum.FACE_COMPARISON.getUrl();
|
||||
String apiUrltest = "192.168.1.196:5403/compare";
|
||||
=======
|
||||
// String apiUrl = apiServerPrefix + ApiUrlEnum.FACE_COMPARISON.getUrl();
|
||||
String apiUrltest = "http://192.168.1.196:5001/compare";
|
||||
>>>>>>> 26aceca82a102504f904715404a73aa391abac98
|
||||
FaceCompareVO faceCompareVO = new FaceCompareVO();
|
||||
faceCompareVO.setImage1(compareRequestVo.getUrlList().get(0));
|
||||
faceCompareVO.setImage2(compareRequestVo.getUrlList().get(1));
|
||||
|
@ -116,10 +121,22 @@ public class CompareServiceImpl implements ICompareService {
|
|||
ApiFaceOneSearchReturnFaceVO apiFaceOneSearchReturnFaceVO = JsonUtil.string2Obj(JsonUtil.obj2String(returnVO.getData()), new TypeReference<ApiFaceOneSearchReturnFaceVO>() {});
|
||||
//返回结果集
|
||||
OneToOneResultVo oneToOneResultVo = new OneToOneResultVo();
|
||||
<<<<<<< HEAD
|
||||
if (UtilValidate.isNotEmpty(apiFaceOneSearchReturnFaceVO)){
|
||||
oneToOneResultVo.getUrls().add(faceCompareVO.getImage1());
|
||||
oneToOneResultVo.getUrls().add(faceCompareVO.getImage2());
|
||||
oneToOneResultVo.setScore(apiFaceOneSearchReturnFaceVO.getHitSimilarity());
|
||||
=======
|
||||
if (UtilValidate.isNotEmpty(apiFaceOneSearchReturnFaceVO)) {
|
||||
// if (UtilValidate.isNotEmpty(apiFaceOneSearchReturnFaceVO.getFaces())) {
|
||||
// for (ApiFaceOneSearchFaceVO apiFaceOneSearchFaceVO : apiFaceOneSearchReturnFaceVO.getFaces()) {
|
||||
// oneToOneResultVo.getUrls().add(apiFaceOneSearchFaceVO.getUrl());
|
||||
// }
|
||||
oneToOneResultVo.getUrls().add(faceCompareVO.getImage1());
|
||||
oneToOneResultVo.getUrls().add(faceCompareVO.getImage1());
|
||||
oneToOneResultVo.setScore(apiFaceOneSearchReturnFaceVO.getHitSimilarity());
|
||||
// }
|
||||
>>>>>>> 26aceca82a102504f904715404a73aa391abac98
|
||||
}
|
||||
// if (UtilValidate.isNotEmpty(apiFaceOneSearchReturnFaceVO)) {
|
||||
// if (UtilValidate.isNotEmpty(apiFaceOneSearchReturnFaceVO.getFaces())) {
|
||||
|
@ -142,7 +159,7 @@ public class CompareServiceImpl implements ICompareService {
|
|||
throw new DkException("文件上传失败");
|
||||
}
|
||||
String imag = map1.getString("url");
|
||||
//人脸检测方法
|
||||
//人脸检测方法入口
|
||||
validateSingleFaceImage(imag);
|
||||
return imag;
|
||||
|
||||
|
@ -167,7 +184,11 @@ public class CompareServiceImpl implements ICompareService {
|
|||
private void validateSingleFaceImage(String image) {
|
||||
//人脸检测url
|
||||
//String faceSearchUrl = apiRequestPrefix + ApiUrlEnum.FACE_SEARCH.getUrl();
|
||||
<<<<<<< HEAD
|
||||
String faceSearchUrltest ="http://192.168.3.134:5000/message/mask";
|
||||
=======
|
||||
String faceSearchUrltest ="http://192.168.3.132:5000/message/mask";
|
||||
>>>>>>> 26aceca82a102504f904715404a73aa391abac98
|
||||
//组装api请求数据
|
||||
ReturnVO returnVO;
|
||||
returnVO = (ReturnVO) httpUtil.post(faceSearchUrltest + "?url=" + image, null, ReturnVO.class);
|
||||
|
|
|
@ -110,7 +110,7 @@ renren.redis.open: false
|
|||
#人脸API统一请求地址定义
|
||||
api:
|
||||
server:
|
||||
prefix: http://192.168.1.161:8013/dkha/
|
||||
prefix: http://192.168.1.196:5001/
|
||||
#人脸检索最大返回值
|
||||
max:
|
||||
result: 100
|
||||
|
|
Loading…
Reference in New Issue