mirror of
https://github.com/Kagami/go-face.git
synced 2025-09-26 19:51:16 +08:00
34 lines
536 B
C
34 lines
536 B
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef enum {
|
|
IMAGE_LOAD_ERROR,
|
|
SERIALIZATION_ERROR,
|
|
RECOGNIZE_ERROR,
|
|
UNKNOWN_ERROR,
|
|
} err_code;
|
|
|
|
typedef struct facerec {
|
|
void* cls;
|
|
const char* err_str;
|
|
err_code err_code;
|
|
} facerec;
|
|
|
|
typedef struct faceret {
|
|
float* descriptors;
|
|
int num_faces;
|
|
const char* err_str;
|
|
err_code err_code;
|
|
} faceret;
|
|
|
|
facerec* facerec_init(const char* model_dir);
|
|
faceret* facerec_recognize(facerec* rec, const char* img_path);
|
|
void facerec_free(facerec* rec);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|