具体代码请看:NDKPractice项目的opencv71
1. 训练人脸样本
三种训练方法:
- eigenFace 算法 : EigenFaceRecognizer
- FisherFace 算法:FisherFaceRecognizer
- LBPH 算法:LBPHFaceRecognizer
1 | Java_com_east_opencv71_FaceDetection_trainingPattern(JNIEnv *env, jobject instance) { |
2. 识别人脸
1 | Java_com_east_opencv71_FaceDetection_loadPattern(JNIEnv *env, jobject instance, |