|
@@ -46,10 +46,16 @@ public class FaceServiceImpl implements IFaceService {
|
|
|
score = faceEngineInit.getScore();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 人脸检测
|
|
|
+ *
|
|
|
+ * @param file 人脸图片
|
|
|
+ * @return 返回是否检测到人脸
|
|
|
+ */
|
|
|
@Override
|
|
|
- public void detectFaces(File file) {
|
|
|
+ public boolean detectFaces(File file) {
|
|
|
if (!faceEnabled) {
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
byte[] featureData = faceFeature(file);
|
|
|
if (featureData != null) {
|
|
@@ -59,7 +65,9 @@ public class FaceServiceImpl implements IFaceService {
|
|
|
expand.setFaceFeature(feature);
|
|
|
expandService.updateSysUserExpand(expand);
|
|
|
FaceEngineUtil.registerFaceFeature(faceEngine, expand);
|
|
|
+ return true;
|
|
|
}
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
/**
|