Face Engine SDK  5.17.0
A face detection, recognition and tracking engine.
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 
56 
62  struct EyesRects {
63  Rect leftEyeRect;
64  Rect rightEyeRect;
65  };
66 
67  EyesRects
68  cropByLandmarks5(
69  const Image& warp,
70  const Landmarks5& landmarks5
71  );
72 
74  cropByLandmarks68(
75  const Image& warp,
76  const Landmarks68& landmarks68
77  );
78  };
79 
80 
105  virtual Result<FSDKError>
107  const Image& warp,
108  const EyeCropper::EyesRects& eyeRects,
109  EyesEstimation& eyesEstimation) const noexcept = 0;
110 
125  virtual Result<FSDKError>
127  Span<const Image> warps,
129  Span<EyesEstimation> eyesEstimations) const noexcept = 0;
130 
142  virtual Result<FSDKError>
144  Span<const Image> warps,
146  Span<Result<FSDKError>> errors) const noexcept = 0;
147  };
149 } // namespace fsdk
fsdk::IEyeEstimator::estimate
virtual Result< FSDKError > estimate(Span< const Image > warps, Span< const EyeCropper::EyesRects > eyeRects, Span< EyesEstimation > eyesEstimations) const noexcept=0
Estimate the attributes of multiple warped images in a single estimate function call.
fsdk::Span
Span. @detail Not owning data view. It incapsulated pointer to the continuous array with one or more ...
Definition: Span.h:14
fsdk::EyesEstimation::rightEye
EyeAttributes rightEye
Right eye attributes.
Definition: IEyeEstimator.h:53
fsdk::EyesEstimation::EyeAttributes::State
State
Enumeration of possible eye states.
Definition: IEyeEstimator.h:31
fsdk::EyesEstimation::EyeAttributes::State::Open
@ Open
Eye is open.
fsdk::EyesEstimation::EyeAttributes::eyelidLandmarksCount
static constexpr uint64_t eyelidLandmarksCount
Eyelid landmarks amount.
Definition: IEyeEstimator.h:38
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:56
fsdk::EyesEstimation::EyeAttributes::eyelid
EyelidLandmarks eyelid
Eyelid landmarks.
Definition: IEyeEstimator.h:49
fsdk
SDK namespace.
Definition: IAGSEstimator.h:8
fsdk::BaseRect< int >
fsdk::EyesEstimation::EyeAttributes::state
State state
State of an eye.
Definition: IEyeEstimator.h:46
fsdk::EyesEstimation::EyeAttributes::iris
IrisLandmarks iris
Iris landmarks.
Definition: IEyeEstimator.h:48
fsdk::EyesEstimation::leftEye
EyeAttributes leftEye
Left eye attributes.
Definition: IEyeEstimator.h:52
FSDK_API
#define FSDK_API
Dummy.
Definition: Def.h:27
fsdk::Landmarks< irisLandmarksCount >
fsdk::IEyeEstimator::validate
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.
fsdk::IEyeEstimator::estimate
virtual Result< FSDKError > estimate(const Image &warp, const EyeCropper::EyesRects &eyeRects, EyesEstimation &eyesEstimation) const noexcept=0
Estimate the attributes.
fsdk::EyesEstimation::EyeAttributes::irisLandmarksCount
static constexpr uint64_t irisLandmarksCount
Iris landmarks amount.
Definition: IEyeEstimator.h:37
fsdk::EyesEstimation::EyeAttributes::State::Occluded
@ Occluded
Eye is blocked by something not transparent, or landmark passed to estimator doesn't point to an eye.
fsdk::Result
A structure that encapsulates an action result enumeration.
Definition: Result.h:27
fsdk::EyesEstimation
Eyes estimation output.
Definition: IEyeEstimator.h:23
fsdk::EyeCropper::EyesRects
Definition: IEyeEstimator.h:62
fsdk::Image
Image.
Definition: Image.h:38
fsdk::IEyeEstimator
Eye estimator interface.
Definition: IEyeEstimator.h:90
fsdk::EyesEstimation::EyeAttributes::State::Closed
@ Closed
Eye is closed.
fsdk::EyesEstimation::EyeAttributes
Eyes attribute structure.
Definition: IEyeEstimator.h:27
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:37
fsdk::EyeCropper
EyeCropper is a helper structure for IEyeEstimator interface Methods of this structure crop an input ...
Definition: IEyeEstimator.h:61