Face Engine SDK  4.6.0
A face detection, recognition and tracking engine.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
IEyeEstimator.h
1 #pragma once
2 
3 #include <fsdk/IObject.h>
4 #include <fsdk/FSDKError.h>
5 #include <fsdk/Optional.h>
6 #include <fsdk/Types.h>
7 
8 namespace fsdk {
9 
10 #ifndef DOXYGEN_SHOULD_SKIP_THIS
11  DECLARE_SMARTPTR(IEyeEstimator);
12 #endif
13 
18  struct EyesEstimation {
22  struct EyeAttributes {
26  enum class State : uint8_t {
27  Closed,
28  Open,
29  Occluded
30  };
31 
32  static constexpr uint64_t irisLandmarksCount = 32;
33  static constexpr uint64_t eyelidLandmarksCount = 6;
34 
37 
40 
42 
45  };
46 
49  };
50 
51 
57 
58  struct EyesRects {
59  fsdk::Rect leftEyeRect;
60  fsdk::Rect rightEyeRect;
61  };
62 
63  EyesRects
64  cropByLandmarks5(
65  const fsdk::Image& warp,
66  const fsdk::Landmarks5& landmarks5
67  );
68 
70  cropByLandmarks68(
71  const fsdk::Image& warp,
72  const fsdk::Landmarks68& landmarks68
73  );
74  };
75 
76 
98  virtual Result<FSDKError>
99  FSDK_DEPRECATED("estimate by landmarks5 is deprecated since v.3.6.0, use estimate(const Image& warp,"
100  "const EyeCropper::EyesRects& eyeRects,EyesEstimation& eyesEstimation) instead")
101  estimate(
102  const Image& warp,
103  const Landmarks5& landmarks5,
104  EyesEstimation& eyesEstimation) const noexcept = 0;
105 
117  virtual Result<FSDKError>
118  FSDK_DEPRECATED("estimate by landmarks68 is deprecated since v.3.6.0, use estimate(const Image& warp,"
119  "const EyeCropper::EyesRects& eyeRects, EyesEstimation& eyesEstimation) instead")
120  estimate(
121  const Image& warp,
122  const Landmarks68& landmarks68,
123  EyesEstimation& eyesEstimation) const noexcept = 0;
124 
136  virtual Result<FSDKError>
137  estimate(
138  const Image& warp,
139  const EyeCropper::EyesRects& eyeRects,
140  EyesEstimation& eyesEstimation) const noexcept = 0;
141 
154  virtual Result<FSDKError>
155  estimate(
156  const Image warps[],
157  const EyeCropper::EyesRects eyeRects[],
158  const uint32_t batchSize,
159  EyesEstimation eyesEstimations[]) const noexcept = 0;
160  };
161 
162 } // namespace fsdk
#define FSDK_API
Dummy.
Definition: Def.h:27
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
Common data types and structures.
Object system types and interfaces.
EyeAttributes leftEye
Left eye attributes.
Definition: IEyeEstimator.h:47
Common SDK error codes.
Eyes estimation output.
Definition: IEyeEstimator.h:18
Definition: IEyeEstimator.h:58
Base strong reference counted object interface.
Definition: IRefCounted.h:36
State
Enumeration of possible eye states.
Definition: IEyeEstimator.h:26
Eyes attribute structure.
Definition: IEyeEstimator.h:22
virtual Result< FSDKError > FSDK_DEPRECATED("estimate by landmarks5 is deprecated since v.3.6.0, use estimate(const Image& warp,""const EyeCropper::EyesRects& eyeRects,EyesEstimation& eyesEstimation) instead") estimate(const Image &warp
Estimate the attributes.
static constexpr uint64_t irisLandmarksCount
Iris landmarks amount.
Definition: IEyeEstimator.h:32
Eye estimator interface.
Definition: IEyeEstimator.h:86
Image.
Definition: Image.h:37
EyelidLandmarks eyelid
Eyelid landmarks.
Definition: IEyeEstimator.h:44
Eye is blocked by something not transparent, or landmark passed to estimator doesn&#39;t point to an eye...
EyeCropper is a helper structure for IEyeEstimator interface Methods of this structure crop an input ...
Definition: IEyeEstimator.h:56
IrisLandmarks iris
Iris landmarks.
Definition: IEyeEstimator.h:43
State state
State of an eye.
Definition: IEyeEstimator.h:41
EyeAttributes rightEye
Right eye attributes.
Definition: IEyeEstimator.h:48
static constexpr uint64_t eyelidLandmarksCount
Eyelid landmarks amount.
Definition: IEyeEstimator.h:33
virtual Result< FSDKError > estimate(const Image &warp, const EyeCropper::EyesRects &eyeRects, EyesEstimation &eyesEstimation) const noexcept=0
Estimate the attributes.