Files
go-face/facerec.h
Kagami Hiiragi 28fa236fbd Initial commit
2018-04-02 19:52:09 +03:00

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