liuxiaolong
2019-05-06 573d1e33a32da5c55c638df2ee622d972976c1d0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef FACEID2_0_FACEDETECT_H
#define FACEID2_0_FACEDETECT_H
#include <jni.h>
#include <string>
 
using namespace std;
 
class FaceDetectHelper {
private:
    static FaceDetectHelper * instance;
    FaceDetectHelper();
    bool init_sdk_success = false;
public:
    static FaceDetectHelper* getInstance();
    bool initSdk(const char* modelPath);
    string detectRealFace(const char* modelPath, const char* rgbFileName, const char* grayFileName, int width, int height, const char* baseFeatureName,
                          int shouldExtractFeature, bool useGrayCamera, int detectFaceCount);
    jbyteArray extractFeature(JNIEnv *env, const char *jpgFileName);
    jbyteArray extractFeature(JNIEnv *env, jbyteArray bgrByteArray, int width, int height);
};
 
 
#endif //FACEID2_0_FACEDETECT_H