| | |
| | | } |
| | | |
| | | private static BDFaceImageInstance rgbInstance =null; |
| | | private LivenessModel livenessModel; |
| | | |
| | | /** |
| | | * 0:管理员,1:用户 |
| | | * @param groupId |
| | | */ |
| | | public void setGroupId(String groupId){ |
| | | if(livenessModel!=null){ |
| | | livenessModel.setGroupId(groupId); |
| | | } |
| | | } |
| | | /** |
| | | * 检测-活体-特征-人脸检索流程 |
| | | * |
| | |
| | | * @param faceDetectCallBack |
| | | */ |
| | | public void onDetectCheck( |
| | | String groupId, |
| | | final BDFaceImageConfig bdFaceImageConfig, |
| | | final BDFaceImageConfig bdNirFaceImageConfig, |
| | | final BDFaceImageConfig bdDepthFaceImageConfig, |
| | |
| | | } |
| | | long startTime = System.currentTimeMillis(); |
| | | // 创建检测结果存储数据 |
| | | LivenessModel livenessModel = new LivenessModel(); |
| | | livenessModel.setGroupId(groupId); |
| | | livenessModel = new LivenessModel(); |
| | | // 创建检测对象,如果原始数据YUV,转为算法检测的图片BGR |
| | | // TODO: 用户调整旋转角度和是否镜像,手机和开发版需要动态适配 |
| | | //System.out.println("==rgbInstance==>初始化"); |
| | |
| | | if (feat != null && feat.getScore() > threholdScore) { |
| | | User userOld = FaceApi.getInstance().getUserListById(feat.getId()); |
| | | //System.out.println("==isOk==>匹配到类型:"+userOld.getUserName()); |
| | | if("0".equals(userOld.getGroupId())){ |
| | | if("1".equals(userOld.getGroupId())){ |
| | | user = userOld; |
| | | topFeature = feat; |
| | | break; |