DFace SDK  1.8.5
dface_recognize.h
1 
2 /*****************************************************************************
3 * DFace pro SDK library
4 * Copyright (C) 2018 杭州小孔成像科技有限公司(dface.tech).
5 * @file dface_r.h
6 * @brief DFace人脸识别API抽象类
7 *
8 *
9 * @author kuaikuai.kim(dface.tech)
10 * @email customer@dface.tech
11 * @version 1.3.2
12 * @date 2018-05-02
13 * @license no free
14 *
15 *----------------------------------------------------------------------------
16 * Remark : Description
17 *----------------------------------------------------------------------------
18 * Change History :
19 * <Date> | <Version> | <Author> | <Description>
20 *----------------------------------------------------------------------------
21 * 2018/05/02 | 1.3.2 | kuaikuai kim |
22 *----------------------------------------------------------------------------
23 *
24 *****************************************************************************/
25 
26 
27 #ifndef DFACE_R_H
28 #define DFACE_R_H
29 
30 #include <string>
31 #include <dface/common.h>
32 #include <dface/mat.h>
33 
34 namespace dface {
35  using namespace std;
36 
41  class DFACE_EXPORTS DfaceRecognize{
42  public:
43  DfaceRecognize(){};
44 
45  virtual int identify() const = 0;
46 
54  virtual float similarity1V1ByFace(const dface::Mat &face1, const dface::Mat &face2) const = 0;
55 
56 
57 
65  virtual float diff1V1ByFace(const dface::Mat &face1, const dface::Mat &face2) const = 0;
66 
67 
68 
76  virtual void extractFaceFeatureByFace(const dface::Mat &face, std::vector<float> &out_features) const = 0;
77 
78 
86  virtual float similarityByFeature(const std::vector<float> &feature_1, const std::vector<float> &feature_2) const = 0;
87 
88 
94  virtual void SetNumThreads(int numThreads) = 0;
95 
96 
101  virtual void SetMinFace(int minSize) = 0;
102 
107  virtual int GetNumThreads() const= 0;
108 
109 
110  virtual ~DfaceRecognize() { return; };
111 
112  };
113 
114 
121  typedef DfaceRecognize* CreateRecognize(string model_path, int accuracy);
122 
127  typedef void DestroyRecognize(DfaceRecognize* rc);
128 
129 }
130 
131 
132 
133 #endif //DFACE_R_H
Definition: common.h:37
DFace人脸识别(特征提取)API抽象层(DFaceRecognize)
Definition: dface_recognize.h:41
Mat dface内置的图像数据 dface的所有接口只支持dface::Mat(RGB格式)
Definition: mat.h:23