pans
2017-01-11 734e1a94bc026ba8e7e71de0a9ddabe12e07b13b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef _FACEDB_H_
#define _FACEDB_H_
 
#include <opencv2/opencv.hpp>
#include <cv_face.h>
#include "time_helper.h"
class FaceDB
{
public:
    FaceDB();
    virtual ~FaceDB();
 
    //ÈËÁ³ÑéÖ¤
    cv_handle_t handle_verify;
    //Êý¾Ý¿â²Ù×÷
    cv_handle_t handle_db;
    //¾²Ì¬ÈËÁ³Ê¶±ð
    cv_handle_t handle_detect;
 
    //³õʼ»¯
    bool init(char* db_path);
    //±£´æÊý¾Ý¿â
    bool finally();
 
    //ËÑË÷SDKÊý¾Ý¿â
    int search_db(cv_feature_t* p_feature );
    //Ìí¼Ó¼Ç¼
    int db_add(cv_feature_t* p_feature);
 
 
    //ÌáÈ¡ÌØÕ÷Öµ
    cv_feature_t *extract_feature(cv::Mat image_color);
 
private:
    cv_result_t cv_result;
    char* db_path;
 
    //¼ÓÔØsdkÊý¾Ý¿â
    bool db_load();
    bool db_save();
};
#endif