| Face Engine SDK 5.31.2 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
22 enum class RedEyeStatus : uint8_t {
23 NonRed,
24 Red,
25 };
26
31 struct RedEyeEstimation {
35 struct RedEyeAttributes {
36 RedEyeStatus status;
37 float score;
38 };
39
40 RedEyeAttributes leftEye;
41 RedEyeAttributes rightEye;
42 };
43
49 struct IRedEyeEstimator : IRefCounted {
59 virtual Result<FSDKError> estimate(
60 const Image& warp,
61 const Landmarks5& landmarks5Transformed,
62 RedEyeEstimation& estimation) const noexcept = 0;
63
75 virtual Result<FSDKError> estimate(
76 Span<const Image> warps,
77 Span<const Landmarks5> landmarks5Transformed,
78 Span<RedEyeEstimation> estimations) const noexcept = 0;
79
91 virtual Result<FSDKError> validate(
92 Span<const Image> warps,
93 Span<const Landmarks5> landmarks5Transformed,
94 Span<Result<FSDKError>> errors) const noexcept = 0;
95 };
96
98 } // namespace fsdk
fsdk::RedEyeStatus::NonRed
Eye is not red.
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:56
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
Face landmarks template structure.
Definition: Landmarks.h:23
fsdk::RedEyeStatus::Red
Eye is red.
IObject.h
Object system types and interfaces.
fsdk::RedEyeEstimation
Red eye estimation output.
Definition: IRedEyeEstimator.h:31
fsdk::RedEyeStatus
RedEyeStatus
Enumeration of possible red eye statuses.
Definition: IRedEyeEstimator.h:22
fsdk::RedEyeEstimation::rightEye
RedEyeAttributes rightEye
Right eye attributes.
Definition: IRedEyeEstimator.h:41
FSDKError.h
Common SDK error codes.
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:37
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:36
fsdk::Image
Image.
Definition: Image.h:38
fsdk::IRedEyeEstimator
Red eye estimator interface.
Definition: IRedEyeEstimator.h:49
fsdk::RedEyeEstimation::RedEyeAttributes
Eyes attribute structure.
Definition: IRedEyeEstimator.h:35
fsdk::RedEyeEstimation::RedEyeAttributes::score
float score
Score, numerical value in range [0,1].
Definition: IRedEyeEstimator.h:37
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:40