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

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
fsdk::Span
Span. @detail Not owning data view. It incapsulated pointer to the continuous array with one or more ...
Definition: Span.h:15
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
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::IBestShotQualityEstimator::estimateAll
@ estimateAll
Make full estimation (all attributes)
Definition: IBestShotQualityEstimator.h:29
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
SDK namespace.
Definition: IAGSEstimator.h:8
fsdk::IBestShotQualityEstimator
BestShot and Quality estimator interface.
Definition: IBestShotQualityEstimator.h:20
fsdk::IBestShotQualityEstimator::estimateHeadPose
@ estimateHeadPose
Estimate HeadPose.
Definition: IBestShotQualityEstimator.h:28
fsdk::IBestShotQualityEstimator::estimate
virtual Result< FSDKError > estimate(Span< const Image > images, Span< const Detection > detections, const EstimationRequest request, Span< EstimationResult > results) const noexcept=0
Estimate unified AGS and HeadPose attributes of multiple frames in a single estimate function call.
fsdk::Detection
Detection structure. @detail Stores a detected bounding box within a source image rect.
Definition: Detection.h:10
fsdk::IBestShotQualityEstimator::EstimationRequest
EstimationRequest
EstimationRequest lists all possible estimation attributes that BestShotQuality estimator is able to ...
Definition: IBestShotQualityEstimator.h:26
fsdk::IBestShotQualityEstimator::estimateAGS
@ estimateAGS
Estimate AGS.
Definition: IBestShotQualityEstimator.h:27
fsdk::IBestShotQualityEstimator::EstimationResult
BestShotQualityEstimator output structure.
Definition: IBestShotQualityEstimator.h:35
fsdk::Result
A structure that encapsulates an action result enumeration.
Definition: Result.h:30
fsdk::IBestShotQualityEstimator::EstimationResult::headPose
Optional< HeadPoseEstimation > headPose
HeadPose estimation if was requested, empty otherwise.
Definition: IBestShotQualityEstimator.h:36
fsdk::IBestShotQualityEstimator::EstimationResult::ags
Optional< float > ags
AGS estimation if was requested, empty otherwise.
Definition: IBestShotQualityEstimator.h:37
fsdk::Image
Image.
Definition: Image.h:37
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:36