| Face Engine SDK 5.35.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 #include <fsdk/Types/SensorType.h>
8
9 namespace fsdk {
10
11 #ifndef DOXYGEN_SHOULD_SKIP_THIS
12 DECLARE_SMARTPTR(IEyeEstimator);
13 #endif
14
24 struct EyesEstimation {
28 struct EyeAttributes {
32 enum class State : uint8_t {
33 Closed,
34 Open,
35 Occluded
36 };
37
38 static constexpr uint64_t irisLandmarksCount = 32;
39 static constexpr uint64_t eyelidLandmarksCount = 6;
40
42 using IrisLandmarks = Landmarks<irisLandmarksCount>;
43
45 using EyelidLandmarks = Landmarks<eyelidLandmarksCount>;
46
47 State state;
48
49 IrisLandmarks iris;
50 EyelidLandmarks eyelid;
51 };
52
53 EyeAttributes leftEye;
54 EyeAttributes rightEye;
55 };
56
61 struct FSDK_API EyeCropper {
62 struct EyesRects {
63 Rect leftEyeRect;
64 Rect rightEyeRect;
65 };
66
67 EyesRects cropByLandmarks5(const Image& warp, const Landmarks5& landmarks5);
68
69 EyeCropper::EyesRects cropByLandmarks68(const Image& warp, const Landmarks68& landmarks68);
70 };
71
82 struct IEyeEstimator : IRefCounted {
97 virtual Result<FSDKError> estimate(
98 const Image& warp,
99 const EyeCropper::EyesRects& eyeRects,
100 EyesEstimation& eyesEstimation) const noexcept = 0;
101
117 virtual Result<FSDKError> estimate(
118 Span<const Image> warps,
119 Span<const EyeCropper::EyesRects> eyeRects,
120 Span<EyesEstimation> eyesEstimations) const noexcept = 0;
121
134 virtual Result<FSDKError> validate(
135 Span<const Image> warps,
136 Span<const EyeCropper::EyesRects> eyeRects,
137 Span<Result<FSDKError>> errors) const noexcept = 0;
138 };
139
141 } // namespace fsdk
FSDK_API
#define FSDK_API
Dummy.
Definition: Def.h:27
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:70
fsdk
SDK namespace.
Definition: IAGSEstimator.h:8
fsdk::Result
A structure that encapsulates an action result enumeration.
Definition: Result.h:27
Types.h
Common data types and structures.
fsdk::Landmarks< irisLandmarksCount >
fsdk::EyesEstimation::EyeAttributes::State::Open
Eye is open.
IObject.h
Object system types and interfaces.
fsdk::EyesEstimation::leftEye
EyeAttributes leftEye
Left eye attributes.
Definition: IEyeEstimator.h:53
FSDKError.h
Common SDK error codes.
fsdk::EyesEstimation
Eyes estimation output.
Definition: IEyeEstimator.h:24
fsdk::EyeCropper::EyesRects
Definition: IEyeEstimator.h:62
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:37
fsdk::EyesEstimation::EyeAttributes::State
State
Enumeration of possible eye states.
Definition: IEyeEstimator.h:32
fsdk::EyesEstimation::EyeAttributes
Eyes attribute structure.
Definition: IEyeEstimator.h:28
fsdk::EyesEstimation::EyeAttributes::irisLandmarksCount
static constexpr uint64_t irisLandmarksCount
Iris landmarks amount.
Definition: IEyeEstimator.h:38
fsdk::IEyeEstimator
Eye estimator interface.
Definition: IEyeEstimator.h:82
fsdk::Image
Image.
Definition: Image.h:38
fsdk::EyesEstimation::EyeAttributes::eyelid
EyelidLandmarks eyelid
Eyelid landmarks.
Definition: IEyeEstimator.h:50
fsdk::EyesEstimation::EyeAttributes::State::Occluded
Eye is concealed, or landmark passed to estimator doesn&#39;t point to an eye.
fsdk::BaseRect< int >
fsdk::EyeCropper
EyeCropper is a helper structure for IEyeEstimator interface Methods of this structure crop an input ...
Definition: IEyeEstimator.h:61
fsdk::EyesEstimation::EyeAttributes::iris
IrisLandmarks iris
Iris landmarks.
Definition: IEyeEstimator.h:49
fsdk::EyesEstimation::EyeAttributes::State::Closed
Eye is closed.
fsdk::EyesEstimation::EyeAttributes::state
State state
State of an eye.
Definition: IEyeEstimator.h:47
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::Span
Span. Not owning data view. It incapsulated pointer to the continuous array with one or more T objec...
Definition: Span.h:14
fsdk::EyesEstimation::rightEye
EyeAttributes rightEye
Right eye attributes.
Definition: IEyeEstimator.h:54
fsdk::EyesEstimation::EyeAttributes::eyelidLandmarksCount
static constexpr uint64_t eyelidLandmarksCount
Eyelid landmarks amount.
Definition: IEyeEstimator.h:39
fsdk::IEyeEstimator::estimate
virtual Result< FSDKError > estimate(const Image &warp, const EyeCropper::EyesRects &eyeRects, EyesEstimation &eyesEstimation) const noexcept=0
Estimate the attributes.