-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce1fa71
commit 93270dd
Showing
2 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#pragma once | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
enum SDK_ERROR | ||
{ | ||
SDK_SUCCESS = 0, | ||
SDK_LICENSE_KEY_ERROR = -1, | ||
SDK_LICENSE_APPID_ERROR = -2, | ||
SDK_LICENSE_EXPIRED = -3, | ||
SDK_NO_ACTIVATED = -4, | ||
SDK_INIT_ERROR = -5, | ||
}; | ||
|
||
typedef struct _tagFaceBox | ||
{ | ||
int x1, y1, x2, y2; | ||
float liveness; | ||
float yaw, roll, pitch; | ||
float face_quality, face_luminance, eye_dist; | ||
float left_eye_closed, right_eye_closed, face_occlusion, mouth_opened; | ||
float landmark_68[68 * 2]; | ||
} FaceBox; | ||
|
||
/* | ||
* Get the machine code for SDK activation | ||
*/ | ||
const char* getMachineCode(); | ||
|
||
/* | ||
* Activate the SDK using the provided license | ||
*/ | ||
|
||
int setActivation(char* license); | ||
|
||
/* | ||
* Initialize the SDK with the specified model path | ||
*/ | ||
int initSDK(char* modelPath); | ||
|
||
/* | ||
* Detect faces, perform liveness detection, determine face orientation (yaw, roll, pitch), | ||
* assess face quality, detect facial occlusion, eye closure, mouth opening, and identify facial landmarks. | ||
*/ | ||
int faceDetection(unsigned char* rgbData, int width, int height, FaceBox* faceBoxes, int faceBoxCount); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |