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

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
IBestShotQualityEstimator.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 #include "IHeadPoseEstimator.h" // for HeadPoseEstimation
9
10 namespace fsdk {
11
12 #ifndef DOXYGEN_SHOULD_SKIP_THIS
13 DECLARE_SMARTPTR(IBestShotQualityEstimator);
14 #endif
15
20 struct IBestShotQualityEstimator : IRefCounted {
21
26 enum EstimationRequest {
27 estimateAGS = 1 << 0,
28 estimateHeadPose = 1 << 1,
29 estimateAll = 0xffff
30 };
31
35 struct EstimationResult {
36 Optional<HeadPoseEstimation> headPose;
37 Optional<float> ags;
38 };
39
48 virtual Result<FSDKError> estimate(
49 const Image& image,
50 const Detection& detection,
51 const EstimationRequest request,
52 EstimationResult& result) const noexcept = 0;
53
65 virtual Result<FSDKError> estimate(
66 Span<const Image> images,
67 Span<const Detection> detections,
68 const EstimationRequest request,
69 Span<EstimationResult> results) const noexcept = 0;
70
80 virtual Result<FSDKError>
81 validate(
82 Span<const Image> images,
83 Span<const Detection> detections,
84 const fsdk::IBestShotQualityEstimator::EstimationRequest request,
85 Span<Result<FSDKError>> errors) const noexcept = 0;
86 };
87
88 /*
89 Implementation details.
90 */
91 inline IBestShotQualityEstimator::EstimationRequest
92 operator|(
93 IBestShotQualityEstimator::EstimationRequest first,
94 IBestShotQualityEstimator::EstimationRequest second
95 ) {
96 return static_cast<IBestShotQualityEstimator::EstimationRequest>(
97 static_cast<int>(first) | static_cast<int>(second)
98 );
99 }
100
101 } // namespace fsdk
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
fsdk::Result
A structure that encapsulates an action result enumeration.
Definition: Result.h:29
Types.h
Common data types and structures.
fsdk::IBestShotQualityEstimator
BestShot and Quality estimator interface.
Definition: IBestShotQualityEstimator.h:20
fsdk::IBestShotQualityEstimator::EstimationRequest
EstimationRequest
EstimationRequest lists all possible estimation attributes that BestShotQuality estimator is able to ...
Definition: IBestShotQualityEstimator.h:26
IObject.h
Object system types and interfaces.
fsdk::IBestShotQualityEstimator::EstimationResult
BestShotQualityEstimator output structure.
Definition: IBestShotQualityEstimator.h:35
FSDKError.h
Common SDK error codes.
fsdk::IBestShotQualityEstimator::estimate
virtual Result< FSDKError > estimate(const Image &image, const Detection &detection, const EstimationRequest request, EstimationResult &result) const noexcept=0
Estimate unified AGS and HeadPose attributes.
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:36
fsdk::IBestShotQualityEstimator::estimateAll
Make full estimation (all attributes)
Definition: IBestShotQualityEstimator.h:29
fsdk::IBestShotQualityEstimator::estimateHeadPose
Estimate HeadPose.
Definition: IBestShotQualityEstimator.h:28
fsdk::IBestShotQualityEstimator::validate
virtual Result< FSDKError > validate(Span< const Image > images, Span< const Detection > detections, const fsdk::IBestShotQualityEstimator::EstimationRequest request, Span< Result< FSDKError >> errors) const noexcept=0
Validate input of multiple frames in a single function call.
fsdk::Image
Image.
Definition: Image.h:37
fsdk::IBestShotQualityEstimator::EstimationResult::ags
Optional< float > ags
AGS estimation if was requested, empty otherwise.
Definition: IBestShotQualityEstimator.h:37
fsdk::Detection
Detection structure. Stores a detected bounding box within a source image rect.
Definition: Detection.h:10
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::IBestShotQualityEstimator::estimateAGS
Estimate AGS.
Definition: IBestShotQualityEstimator.h:27
fsdk::IBestShotQualityEstimator::EstimationResult::headPose
Optional< HeadPoseEstimation > headPose
HeadPose estimation if was requested, empty otherwise.
Definition: IBestShotQualityEstimator.h:36