| 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
IHeadPoseEstimator.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 <cmath>
9
10 namespace fsdk {
11
12 #ifndef DOXYGEN_SHOULD_SKIP_THIS
13 DECLARE_SMARTPTR(IHeadPoseEstimator);
14 #endif
15
21 struct HeadPoseEstimation {
22 float pitch;
23 float yaw;
24 float roll;
25
26 enum FrontalFaceType {
27 Non = 0,
28 Good,
29 ISO
30 };
31
35 inline FrontalFaceType getFrontalFaceType() const;
36 };
37
48 struct IHeadPoseEstimator : IRefCounted {
55 virtual Result<FSDKError>
56 FSDK_DEPRECATED("HeadPoseEstimator is deprecated since v.5.0.1, use BestShotQualityEstimator instead")
57 estimate(
58 const Landmarks68 &landmarks,
59 HeadPoseEstimation& out) const noexcept = 0;
67 virtual Result<FSDKError>
68 FSDK_DEPRECATED("HeadPoseEstimator is deprecated since v.5.0.1, use BestShotQualityEstimator instead")
69 estimate(
70 const Image& image,
71 const Detection& detection,
72 HeadPoseEstimation& out) const noexcept = 0;
73
81 virtual Result<FSDKError>
82 FSDK_DEPRECATED("HeadPoseEstimator is deprecated since v.5.0.1, use BestShotQualityEstimator instead")
83 estimate(
84 Span<const Image> images,
85 Span<const Detection> detections,
86 Span<HeadPoseEstimation> out) const noexcept = 0;
87
96 virtual Result<FSDKError>
97 FSDK_DEPRECATED("HeadPoseEstimator is deprecated since v.5.0.1, use BestShotQualityEstimator instead")
98 validate(
99 Span<const Image> images,
100 Span<const Detection> detections,
101 Span<Result<FSDKError>> errors) const noexcept = 0;
102 };
103
104 /*
105 Implementation details.
106 */
107 HeadPoseEstimation::FrontalFaceType
108 HeadPoseEstimation::getFrontalFaceType() const {
109 if(std::abs(roll) <= 8 && std::abs(pitch) <= 5 && std::abs(yaw) <= 5)
110 return HeadPoseEstimation::ISO;
111 if(std::abs(roll) <= 30 && std::abs(pitch) <= 40 && std::abs(yaw) <= 40)
112 return HeadPoseEstimation::Good;
113 return HeadPoseEstimation::Non;
114 }
115
116 } // namespace fsdk
fsdk::HeadPoseEstimation
Head pose estimation output.
Definition: IHeadPoseEstimator.h:21
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::Landmarks
Face landmarks template structure.
Definition: Landmarks.h:20
fsdk::HeadPoseEstimation::roll
float roll
Roll angle estimation.
Definition: IHeadPoseEstimator.h:24
fsdk::IHeadPoseEstimator::estimate
virtual Result< FSDKError > estimate(const Landmarks68 &landmarks, HeadPoseEstimation &out) const noexcept=0
Estimate the angles.
fsdk::HeadPoseEstimation::yaw
float yaw
Yaw angle estimation.
Definition: IHeadPoseEstimator.h:23
fsdk::IHeadPoseEstimator::validate
virtual Result< FSDKError > validate(Span< const Image > images, Span< const Detection > detections, Span< Result< FSDKError >> errors) const noexcept=0
Validate input of multiple frames in a single function call.
IObject.h
Object system types and interfaces.
FSDKError.h
Common SDK error codes.
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:36
fsdk::HeadPoseEstimation::Non
Non-frontal face.
Definition: IHeadPoseEstimator.h:27
fsdk::HeadPoseEstimation::Good
Good for recognition; Doesn&#39;t descrease recall and looks fine.
Definition: IHeadPoseEstimator.h:28
fsdk::Image
Image.
Definition: Image.h:37
fsdk::HeadPoseEstimation::ISO
GOST/ISO angles.
Definition: IHeadPoseEstimator.h:29
fsdk::HeadPoseEstimation::FrontalFaceType
FrontalFaceType
Definition: IHeadPoseEstimator.h:26
fsdk::HeadPoseEstimation::pitch
float pitch
Pitch angle estimation.
Definition: IHeadPoseEstimator.h:22
fsdk::IHeadPoseEstimator
Head pose angles estimator interface.
Definition: IHeadPoseEstimator.h:48
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::HeadPoseEstimation::getFrontalFaceType
FrontalFaceType getFrontalFaceType() const
Returns type of face frontality.
Definition: IHeadPoseEstimator.h:108