| Face Engine SDK 5.7.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 #include "IHeadPoseEstimator.h" // for HeadPoseEstimation
3
4 #include <fsdk/IObject.h>
5 #include <fsdk/FSDKError.h>
6 #include <fsdk/Optional.h>
7 #include <fsdk/Types.h>
8 #include <fsdk/vlc/future.h>
9 #include <vector>
10
11 namespace fsdk {
12
13 #ifndef DOXYGEN_SHOULD_SKIP_THIS
14 DECLARE_SMARTPTR(IBestShotQualityEstimator);
15 #endif
16
17
22 struct IBestShotQualityEstimator : IRefCounted {
27 enum EstimationRequest {
28 estimateAGS = 1 << 0,
29 estimateHeadPose = 1 << 1,
30 estimateAll = 0xffff
31 };
32
36 struct EstimationResult {
37 Optional<HeadPoseEstimation> headPose;
38 Optional<float> ags;
39 };
40
52 virtual Result<FSDKError> estimate(
53 const Image& image,
54 const Detection& detection,
55 const EstimationRequest request,
56 EstimationResult& result) const noexcept = 0;
57
71 virtual Result<FSDKError> estimate(
72 Span<const Image> images,
73 Span<const Detection> detections,
74 const EstimationRequest request,
75 Span<EstimationResult> results) const noexcept = 0;
76
80 using EstimationBatch = std::vector<EstimationResult>;
81 using EstimationBatchFuture = vlc::future<EstimationBatch>;
96 virtual EstimationBatchFuture estimateAsync(
97 Span<const Image> images,
98 Span<const Detection> detections,
99 const EstimationRequest request) const = 0;
100
114 virtual Result<FSDKError>
115 validate(
116 Span<const Image> images,
117 Span<const Detection> detections,
118 const EstimationRequest request,
119 Span<Result<FSDKError>> errors) const noexcept = 0;
120 };
121
122 /*
123 Implementation details.
124 */
125 inline IBestShotQualityEstimator::EstimationRequest
126 operator|(
127 IBestShotQualityEstimator::EstimationRequest first,
128 IBestShotQualityEstimator::EstimationRequest second
129 ) {
130 return static_cast<IBestShotQualityEstimator::EstimationRequest>(
131 static_cast<int>(first) | static_cast<int>(second)
132 );
133 }
134
135 } // 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::validate
virtual Result< FSDKError > validate(Span< const Image > images, Span< const Detection > detections, const EstimationRequest request, Span< Result< FSDKError >> errors) const noexcept=0
Validate input of multiple frames in a single function call.
fsdk::IBestShotQualityEstimator
BestShotQuality estimator interface.
Definition: IBestShotQualityEstimator.h:22
fsdk::IBestShotQualityEstimator::EstimationRequest
EstimationRequest
EstimationRequest lists all possible estimation attributes that BestShotQuality estimator is able to ...
Definition: IBestShotQualityEstimator.h:27
IObject.h
Object system types and interfaces.
fsdk::IBestShotQualityEstimator::EstimationResult
BestShotQualityEstimator output structure.
Definition: IBestShotQualityEstimator.h:36
fsdk::IBestShotQualityEstimator::estimateAsync
virtual EstimationBatchFuture estimateAsync(Span< const Image > images, Span< const Detection > detections, const EstimationRequest request) const =0
Asynchronously estimate unified AGS and HeadPose attributes of multiple frames in a single estimate f...
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:30
fsdk::IBestShotQualityEstimator::estimateHeadPose
Estimate HeadPose.
Definition: IBestShotQualityEstimator.h:29
fsdk::Image
Image.
Definition: Image.h:38
fsdk::IBestShotQualityEstimator::EstimationResult::ags
Optional< float > ags
AGS estimation if was requested, empty otherwise.
Definition: IBestShotQualityEstimator.h:38
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:28
fsdk::IBestShotQualityEstimator::EstimationBatch
std::vector< EstimationResult > EstimationBatch
Common aliases for BestShotQuality asynchronous interface.
Definition: IBestShotQualityEstimator.h:80
fsdk::IBestShotQualityEstimator::EstimationResult::headPose
Optional< HeadPoseEstimation > headPose
HeadPose estimation if was requested, empty otherwise.
Definition: IBestShotQualityEstimator.h:37