| Face Engine SDK 4.9.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 fsdk::Image& image,
50 const fsdk::Detection& detection,
51 const fsdk::IBestShotQualityEstimator::EstimationRequest request,
52 fsdk::IBestShotQualityEstimator::EstimationResult& result) const noexcept = 0;
53
65 virtual Result<FSDKError> estimate(
66 const fsdk::Span<const fsdk::Image> images,
67 const fsdk::Span<const fsdk::Detection> detections,
68 const EstimationRequest request,
69 fsdk::Span<fsdk::IBestShotQualityEstimator::EstimationResult> results) const noexcept = 0;
70 };
71
72 /*
73 Implementation details.
74 */
75 inline IBestShotQualityEstimator::EstimationRequest
76 operator|(
77 IBestShotQualityEstimator::EstimationRequest first,
78 IBestShotQualityEstimator::EstimationRequest second
79 ) {
80 return static_cast<IBestShotQualityEstimator::EstimationRequest>(
81 static_cast<int>(first) | static_cast<int>(second)
82 );
83 }
84
85 } // namespace fsdk
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
fsdk
SDK namespace.
Definition: IAGSEstimator.h:8
fsdk::Result< FSDKError >
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::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:36
fsdk::Optional
Definition: Optional.h:14
fsdk::IBestShotQualityEstimator::estimateAll
Make full estimation (all attributes)
Definition: IBestShotQualityEstimator.h:29
fsdk::IBestShotQualityEstimator::estimate
virtual Result< FSDKError > estimate(const fsdk::Image &image, const fsdk::Detection &detection, const fsdk::IBestShotQualityEstimator::EstimationRequest request, fsdk::IBestShotQualityEstimator::EstimationResult &result) const noexcept=0
Estimate unified AGS and HeadPose attributes.
fsdk::IBestShotQualityEstimator::estimateHeadPose
Estimate HeadPose.
Definition: IBestShotQualityEstimator.h:28
fsdk::Image
Image.
Definition: Image.h:38
fsdk::IBestShotQualityEstimator::EstimationResult::ags
Optional< float > ags
AGS estimation if was requested, empty otherwise.
Definition: IBestShotQualityEstimator.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:13
fsdk::IBestShotQualityEstimator::estimateAGS
Estimate AGS.
Definition: IBestShotQualityEstimator.h:27
fsdk::BaseDetection
Face detection. Stores a detected face bounding box within a source image frame as well as detection...
Definition: Detection.h:10
fsdk::IBestShotQualityEstimator::EstimationResult::headPose
Optional< HeadPoseEstimation > headPose
HeadPose estimation if was requested, empty otherwise.
Definition: IBestShotQualityEstimator.h:36