派生自 libgowrapper/face

zhangmeng
2019-12-11 f1e6adc90c273250b24cdd0883ad45a94ba48940
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
43
44
45
46
47
48
49
50
51
#ifndef _cpp_face_hpp_
#define _cpp_face_hpp_
 
#include <vector>
#include <functional>
 
using VecFunc = std::vector<std::function<void()> >;
 
#include "struct.h"
 
namespace cppface
{
    class sdkface{
    public: 
        sdkface();
        ~sdkface();
 
    public: 
        int detector(const int min_faces, const int roll_angles, 
                    const int threads_max, const int gpu);
        int extractor(const int threads_max, const int gpu);
        int propertizer(const int threads_max);
 
        int tracker(const int width, const int height,
                    const int max_faces, const int interval, const int sample_size,
                    const int threads_max, const int gpu);
 
    public:
        int detect(const cIMAGE *img, const int chan, void **fpos, int *fcnt);
        int extract(const cFacePos &pos, const cIMAGE *img, const int chan, void **feat, int *featLen);
        float compare(unsigned char *feat1, unsigned char *feat2);
 
        int propertize(const cFacePos &pos, const cIMAGE *img, const int chan, void **res);
 
        int track(const cIMAGE *img, const int chan, void **fInfo, int *fcnt);
        int resize(const int w, const int h, const int chan);
    private: 
        VecFunc dtors_;
 
        cFacePos *fpos_;
 
        int feature_size_;
        unsigned char *feature_;
 
        cFaceInfo *finfos_;
 
    };
} // namespace cppface
 
 
#endif