DFace SDK  2.0.0
LTM
dface_detect.h
1 
2 /*****************************************************************************
3 * DFace pro SDK library
4 * Copyright (C) 2018 杭州小孔成像科技有限公司(dface.tech).
5 * @file dface_detect.h
6 * @brief DFace人脸检测API抽象类
7 *
8 *
9 * @author Pinhole(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 | Pinhole |
22 *----------------------------------------------------------------------------
23 *
24 *****************************************************************************/
25 
26 #ifndef DFACE_D_H
27 #define DFACE_D_H
28 
29 #include <string>
30 #include "common.h"
31 #include "mat.h"
32 
33 namespace dface{
34  using namespace std;
39  class DFACE_EXPORTS DfaceDetect{
40 
41  public:
42  DfaceDetect(){};
43 
44  virtual ~DfaceDetect() { return; };
45 
50  virtual DfaceDetect* clone() const = 0;
51 
56  virtual bool init(string &model_path) = 0;
57 
58 
59  virtual int identify() const = 0;
60 
69  virtual void detection(const dface::Mat &img, std::vector<dface::Box> &out_bboxs, bool square=true) = 0;
70 
71 
80  virtual void detectionMax(const dface::Mat &img, std::vector<dface::Box> &out_bboxs, bool square=true) = 0;
81 
82 
90  virtual void detectionLimited(const dface::Mat &img, std::vector<dface::Box> &out_bboxs, bool square=true) = 0;
91 
92 
100  virtual void align(const dface::Mat &face, dface::Mat &out_face) const = 0;
101 
102 
112  virtual void detectionMaxAndCrop(const dface::Mat &img, dface::Mat &out_face, std::vector<dface::Box> &out_bboxs) = 0;
113 
114 
124  virtual void detectionAndCrop(const dface::Mat &img, std::vector<dface::Mat> &out_faces, std::vector<dface::Box> &out_bboxs) = 0;
125 
126 
136  virtual void crop(const dface::Mat &img, const dface::Rect &rect, dface::Mat &out_face) = 0;
137 
138 
148  virtual void crop(const dface::Mat &img, const dface::Box &bbox, dface::Mat &out_face) = 0;
149 
150 
160  virtual void predictBlur(const dface::Mat &img, const std::vector<dface::Box> &in_bboxs, std::vector<double> &out_blur) = 0;
161 
171  virtual void predictLight(const dface::Mat &img, const std::vector<dface::Box> &in_bboxs, std::vector<int> &out_light) = 0;
172 
173 
179  virtual void SetNumThreads(int numThreads) = 0;
180 
184  virtual void SetTimeCount(int timeCount) = 0;
185 
191  virtual void SetMinSize(int minSize) = 0;
192 
193 
198  virtual int GetNumThreads() const = 0;
199 
200 
201  };
202 
203 
207  typedef DfaceDetect* CreateDetect();
208 
213  typedef void DestroyDetect(DfaceDetect* dc);
214 
215 }
216 
217 
218 
219 #endif //DFACE_D_H
Definition: allocator.h:14
边框信息(人脸,行人,物体等)
Definition: types.h:16
dface内置的图像数据 dface的所有接口只支持dface::Mat(RGB格式)
Definition: mat.h:23
矩形
Definition: types.h:40
DFace人脸检测API抽象层(DFaceDetect)
Definition: dface_detect.h:39