Face SDK  1.7 Mozart rc
Face Recognition Software Development Kit
face.h
Go to the documentation of this file.
1 
4 #ifndef FACE_SDK_FACE_H
5 #define FACE_SDK_FACE_H
6 
7 #include <face_sdk_base/export.h>
8 #include <face_sdk_base/image.h>
9 
10 #include <vector>
11 #include <tuple>
12 
13 namespace face_sdk
14 {
19  const float UNKNOWN_CONFIDENCE = .0f;
20  const uint32_t UNKNOWN_VERSION = 0;
21 
22 
28  class FACE_SDK_EXPORT face
29  {
30  public:
31  virtual ~face() = default;
32 
35  virtual float confidence() const = 0;
36 
39  virtual int32_t x() const = 0;
40 
43  virtual int32_t y() const = 0;
44 
47  virtual int32_t width() const = 0;
48 
51  virtual int32_t height() const = 0;
52 
55  virtual std::shared_ptr<face_sdk::image> img() const = 0;
56 
59  virtual std::shared_ptr<face_sdk::image> cropped_image() const = 0;
60 
63  virtual bool has_landmarks() const = 0;
64 
67  virtual std::vector< std::tuple<int32_t, int32_t> > landmarks() const = 0;
68 
71  virtual bool is_out_of_bounds_set() const = 0;
72 
76  virtual bool out_of_bounds() const = 0;
77 
80  virtual uint32_t version() const = 0;
81  };
82 
83  typedef std::vector< std::shared_ptr<face_sdk::face> > face_set;
84 
90  std::shared_ptr<face_sdk::face> FACE_SDK_EXPORT make_face(const std::shared_ptr<image> &img);
91 
92  std::shared_ptr<face_sdk::face> FACE_SDK_EXPORT make_face(const std::shared_ptr<image> &img,
93  uint32_t version);
94 
95  std::shared_ptr<face_sdk::face> FACE_SDK_EXPORT make_face(const std::shared_ptr<image> &img,
96  bool out_of_bounds,
97  uint32_t version);
98 
110  std::shared_ptr<face_sdk::face> FACE_SDK_EXPORT make_face(const std::shared_ptr<image> &img,
111  int32_t x, int32_t y, int32_t width, int32_t height,
112  float confidence);
113 
114  std::shared_ptr<face_sdk::face> FACE_SDK_EXPORT make_face(const std::shared_ptr<image> &img,
115  int32_t x, int32_t y, int32_t width, int32_t height,
116  float confidence,
117  uint32_t version);
118 
119  std::shared_ptr<face_sdk::face> FACE_SDK_EXPORT make_face(const std::shared_ptr<image> &img,
120  int32_t x, int32_t y, int32_t width, int32_t height,
121  float confidence,
122  bool out_of_bounds,
123  uint32_t version);
124 
136  std::shared_ptr<face_sdk::face> FACE_SDK_EXPORT make_face(const std::shared_ptr<image> &img,
137  int32_t x, int32_t y, int32_t width, int32_t height,
138  float confidence,
139  const std::vector< std::tuple<int32_t, int32_t> > &landmarks);
140 
141  std::shared_ptr<face_sdk::face> FACE_SDK_EXPORT make_face(const std::shared_ptr<image> &img,
142  int32_t x, int32_t y, int32_t width, int32_t height,
143  float confidence,
144  const std::vector< std::tuple<int32_t, int32_t> > &landmarks,
145  uint32_t version);
146 
147  std::shared_ptr<face_sdk::face> FACE_SDK_EXPORT make_face(const std::shared_ptr<image> &img,
148  int32_t x, int32_t y, int32_t width, int32_t height,
149  float confidence,
150  const std::vector< std::tuple<int32_t, int32_t> > &landmarks,
151  bool out_of_bounds,
152  uint32_t version);
153 
166  std::shared_ptr<face_sdk::face> FACE_SDK_EXPORT make_face(const std::shared_ptr<image> &img,
167  int32_t x, int32_t y, int32_t width, int32_t height,
168  float confidence,
169  const std::vector< std::tuple<int32_t, int32_t> > &landmarks,
170  const std::shared_ptr<image> &cropped_image);
171 
172 
173  std::shared_ptr<face_sdk::face> FACE_SDK_EXPORT make_face(const std::shared_ptr<image> &img,
174  int32_t x, int32_t y, int32_t width, int32_t height,
175  float confidence,
176  const std::vector< std::tuple<int32_t, int32_t> > &landmarks,
177  const std::shared_ptr<image> &cropped_image,
178  uint32_t version);
179 
180  std::shared_ptr<face_sdk::face> FACE_SDK_EXPORT make_face(const std::shared_ptr<image> &img,
181  int32_t x, int32_t y, int32_t width, int32_t height,
182  float confidence,
183  const std::vector< std::tuple<int32_t, int32_t> > &landmarks,
184  const std::shared_ptr<image> &cropped_image,
185  bool out_of_bounds,
186  uint32_t version);
187 
189 }
190 
191 
192 #endif // FACE_SDK_FACE_H
face_sdk::face
The face object. Face object contains information about face bounding box on the image and the origin...
Definition: face.h:28
face_sdk::make_face
std::shared_ptr< face_sdk::face > FACE_SDK_EXPORT make_face(const std::shared_ptr< image > &img)
Make the face object and its bounding box size equal to the original image size.
image.h
export.h