Upgrade face-engine
[adaptation/face-engine.git] / include / face-engine.h
index 80ab41e..19315be 100755 (executable)
@@ -108,12 +108,19 @@ typedef union {
        char Reserved[128];
 } face_engine_component_t;
 
+typedef enum {
+       FACE_ENGINE_DETECTION_MODE_FAST,
+       FACE_ENGINE_DETECTION_MODE_ROBUST,
+} face_engine_detection_mode_e;
+
+
 typedef union {
        struct {
                int nMaxFaceNum; /**< */
                int nScale;             /**< */
                int nInterval; /**< */
-               int nDetectionOption;           /* 0 for FAST, 1 for ROBUST */
+
+               face_engine_detection_mode_e eMode; /**< Default is fast*/
        };
 
        char Reserved[32];
@@ -124,7 +131,6 @@ typedef struct {
        unsigned int len;               /**< size of result data */// in byte unit
 } face_engine_feature_t;
 
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -136,14 +142,19 @@ face_engine_error_e face_engine_destroy(face_engine_h handle);
 face_engine_error_e face_engine_get_param(face_engine_h handle, face_engine_param_t *param);
 face_engine_error_e face_engine_set_param(face_engine_h handle, const face_engine_param_t *param);
 
-face_engine_error_e face_engine_detect_faces(face_engine_h handle, face_engine_image_type_e image_type, const face_engine_image_t *image,  face_engine_rect_t *face[], int *count);
+/*
+       face & orientation should be freed using free() by user.
+
+       orientation indicates degree and it's range is 0~359.
+*/
+face_engine_error_e face_engine_detect_faces(face_engine_h handle, face_engine_image_type_e image_type, const face_engine_image_t *image, face_engine_rect_t *face[], int *orientation[], int *count);
 
 face_engine_error_e face_engine_track_faces(face_engine_h handle, const face_engine_rect_t *prev_rect, face_engine_rect_t *cur_rect);
 
 face_engine_error_e face_engine_extract_face_component(face_engine_h handle, const face_engine_image_t *image, const face_engine_rect_t *rect, face_engine_component_t *component);
 face_engine_error_e face_engine_extract_face_feature(face_engine_h handle, const face_engine_image_t *image, const face_engine_component_t *component, face_engine_feature_t *feature);
 
-face_engine_error_e face_engine_compare_face_feature(const face_engine_feature_t *A, const face_engine_feature_t *B, int *similarity);
+face_engine_error_e face_engine_compare_face_feature( face_engine_h handle, const face_engine_feature_t *A, const face_engine_feature_t *B, int *similarity);
 
 face_engine_error_e face_engine_recognize_face_expression(face_engine_h handle, const face_engine_image_t *image , const face_engine_component_t *component, face_engine_expression_e *expression);