| Face Engine SDK 5.12.0 A face detection, recognition and tracking engine.

IRedEyeEstimator.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(IRedEyeEstimator);
12 #endif
13
17 enum class RedEyeStatus : uint8_t {
18 NonRed,
19 Red,
20 };
21
26 struct RedEyeEstimation {
30 struct RedEyeAttributes {
31 RedEyeStatus status;
32 float score;
33 };
34
35 RedEyeAttributes leftEye;
36 RedEyeAttributes rightEye;
37 };
38
44 struct IRedEyeEstimator: IRefCounted {
54 virtual Result<FSDKError> estimate(
55 const Image& warp,
56 const Landmarks5& landmarks5Transformed,
57 RedEyeEstimation& estimation) const noexcept = 0;
58
70 virtual Result<FSDKError> estimate(
71 Span<const Image> warps,
72 Span<const Landmarks5> landmarks5Transformed,
73 Span<RedEyeEstimation> estimations) const noexcept = 0;
74
86 virtual Result<FSDKError>
87 validate(
88 Span<const Image> warps,
89 Span<const Landmarks5> landmarks5Transformed,
90 Span<Result<FSDKError>> errors) const noexcept = 0;
91
92 };
93
94 } // namespace fsdk
fsdk::IRedEyeEstimator::estimate
virtual Result< FSDKError > estimate(const Image &warp, const Landmarks5 &landmarks5Transformed, RedEyeEstimation &estimation) const noexcept=0
Estimates whether red eyes in a photo or not.
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
fsdk
SDK namespace.
Definition: IAGSEstimator.h:8
fsdk::Result
A structure that encapsulates an action result enumeration.
Definition: Result.h:29
Types.h
Common data types and structures.
fsdk::Landmarks
Face landmarks template structure.
Definition: Landmarks.h:21
fsdk::RedEyeStatus
RedEyeStatus
Enumeration of possible red eye statuses.
Definition: IRedEyeEstimator.h:17
IObject.h
Object system types and interfaces.
fsdk::RedEyeEstimation
Red eye estimation output.
Definition: IRedEyeEstimator.h:26
fsdk::RedEyeEstimation::rightEye
RedEyeAttributes rightEye
Right eye attributes.
Definition: IRedEyeEstimator.h:36
FSDKError.h
Common SDK error codes.
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:36
fsdk::RedEyeStatus::NonRed
Eye is not red.
fsdk::IRedEyeEstimator::validate
virtual Result< FSDKError > validate(Span< const Image > warps, Span< const Landmarks5 > landmarks5Transformed, Span< Result< FSDKError >> errors) const noexcept=0
Validates input of multiple frames in a single function call.
fsdk::RedEyeEstimation::RedEyeAttributes::status
RedEyeStatus status
Status of an eye.
Definition: IRedEyeEstimator.h:31
fsdk::Image
Image.
Definition: Image.h:38
fsdk::IRedEyeEstimator
Red eye estimator interface.
Definition: IRedEyeEstimator.h:44
fsdk::RedEyeEstimation::RedEyeAttributes
Eyes attribute structure.
Definition: IRedEyeEstimator.h:30
fsdk::RedEyeStatus::Red
Eye is red.
fsdk::RedEyeEstimation::RedEyeAttributes::score
float score
Score, numerical value in range [0,1].
Definition: IRedEyeEstimator.h:32
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::RedEyeEstimation::leftEye
RedEyeAttributes leftEye
Left eye attributes.
Definition: IRedEyeEstimator.h:35