houxiao
2017-04-28 9a3ef17d8b9f96fa05b5439c89bbfc2868d0f268
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
#ifndef _ST_FACE_CACHE_H_
#define _ST_FACE_CACHE_H_
 
#include <string>
#include "face_daemon_proto.h"
 
struct STFaceImage;
 
class STFaceCache
{
public:
    STFaceCache(const std::string& _stfacedbPath);
    ~STFaceCache();
    
    bool init();
    void finit();
    
    bool load_dbs();
    void close_dbs();
    FDP_FaceDetectResult detect(const STFaceImage& img);
    FDP_FaceDetectResult add(const STFaceImage& img);
    
    //#todo need a delete img, if business not linked faceid and its personid
    // they can delete it and save/find again!
    
private:
    FDP_FaceDetectResult detect_neg(const STFaceImage& img);
 
private:
    const std::string stfacedbPath;
    const std::string stfaceModels;
    void* _dbContext;
    void* _cacheContext;
};
 
#endif