Face Engine SDK  5.21.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 
23  struct EyesEstimation {
27  struct EyeAttributes {
31  enum class State : uint8_t {
32  Closed,
33  Open,
34  Occluded
35  };
36 
37  static constexpr uint64_t irisLandmarksCount = 32;
38  static constexpr uint64_t eyelidLandmarksCount = 6;
39 
42 
45 
47 
50  };
51 
54  };
55 
61  struct EyesRects {
62  Rect leftEyeRect;
63  Rect rightEyeRect;
64  };
65 
66  EyesRects cropByLandmarks5(const Image& warp, const Landmarks5& landmarks5);
67 
68  EyeCropper::EyesRects cropByLandmarks68(const Image& warp, const Landmarks68& landmarks68);
69  };
70 
97  const Image& warp,
98  const EyeCropper::EyesRects& eyeRects,
99  EyesEstimation& eyesEstimation) const noexcept = 0;
100 
116  virtual Result<FSDKError> estimate(
117  Span<const Image> warps,
119  Span<EyesEstimation> eyesEstimations) const noexcept = 0;
120 
133  virtual Result<FSDKError> validate(
134  Span<const Image> warps,
136  Span<Result<FSDKError>> errors) const noexcept = 0;
137  };
138 
140 } // namespace fsdk
#define FSDK_API
Dummy.
Definition: Def.h:27
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:56
A structure that encapsulates an action result enumeration.
Definition: Result.h:27
Common data types and structures.
Object system types and interfaces.
EyeAttributes leftEye
Left eye attributes.
Definition: IEyeEstimator.h:52
Common SDK error codes.
Eyes estimation output.
Definition: IEyeEstimator.h:23
Definition: IEyeEstimator.h:61
Base strong reference counted object interface.
Definition: IRefCounted.h:37
State
Enumeration of possible eye states.
Definition: IEyeEstimator.h:31
Eyes attribute structure.
Definition: IEyeEstimator.h:27
static constexpr uint64_t irisLandmarksCount
Iris landmarks amount.
Definition: IEyeEstimator.h:37
Eye estimator interface.
Definition: IEyeEstimator.h:81
Image.
Definition: Image.h:38
EyelidLandmarks eyelid
Eyelid landmarks.
Definition: IEyeEstimator.h:49
Eye is concealed, 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:60
IrisLandmarks iris
Iris landmarks.
Definition: IEyeEstimator.h:48
State state
State of an eye.
Definition: IEyeEstimator.h:46
virtual Result< FSDKError > validate(Span< const Image > warps, Span< const EyeCropper::EyesRects > eyeRects, Span< Result< FSDKError >> errors) const noexcept=0
Validate input of multiple frames in a single function call.
Span. Not owning data view. It incapsulated pointer to the continuous array with one or more T objec...
Definition: Span.h:14
EyeAttributes rightEye
Right eye attributes.
Definition: IEyeEstimator.h:53
static constexpr uint64_t eyelidLandmarksCount
Eyelid landmarks amount.
Definition: IEyeEstimator.h:38
virtual Result< FSDKError > estimate(const Image &warp, const EyeCropper::EyesRects &eyeRects, EyesEstimation &eyesEstimation) const noexcept=0
Estimate the attributes.