Face Engine SDK  5.14.0
A face detection, recognition and tracking engine.
 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 
27  float pitch;
28  float yaw;
29  float roll;
30 
32  Non = 0,
33  Good,
34  ISO
35  };
36 
40  inline FrontalFaceType getFrontalFaceType() const;
41  };
42 
61  virtual Result<FSDKError>
62  FSDK_DEPRECATED("HeadPoseEstimator is deprecated since v.5.0.1, use BestShotQualityEstimator instead")
63  estimate(
64  const Landmarks68 &landmarks,
65  HeadPoseEstimation& out) const noexcept = 0;
75  virtual Result<FSDKError>
76  FSDK_DEPRECATED("HeadPoseEstimator is deprecated since v.5.0.1, use BestShotQualityEstimator instead")
77  estimate(
78  const Image& image,
79  const Detection& detection,
80  HeadPoseEstimation& out) const noexcept = 0;
81 
93  virtual Result<FSDKError>
94  FSDK_DEPRECATED("HeadPoseEstimator is deprecated since v.5.0.1, use BestShotQualityEstimator instead")
95  estimate(
96  Span<const Image> images,
97  Span<const Detection> detections,
98  Span<HeadPoseEstimation> out) const noexcept = 0;
99 
111  virtual Result<FSDKError>
112  FSDK_DEPRECATED("HeadPoseEstimator is deprecated since v.5.0.1, use BestShotQualityEstimator instead")
113  validate(
114  Span<const Image> images,
115  Span<const Detection> detections,
116  Span<Result<FSDKError>> errors) const noexcept = 0;
117  };
118 
119  /*
120  Implementation details.
121  */
124  if(std::abs(roll) <= 8 && std::abs(pitch) <= 5 && std::abs(yaw) <= 5)
126  if(std::abs(roll) <= 30 && std::abs(pitch) <= 40 && std::abs(yaw) <= 40)
129  }
131 } // namespace fsdk
Head pose estimation output.
Definition: IHeadPoseEstimator.h:26
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
A structure that encapsulates an action result enumeration.
Definition: Result.h:29
Common data types and structures.
Face landmarks template structure.
Definition: Landmarks.h:21
float roll
Roll angle estimation.
Definition: IHeadPoseEstimator.h:29
virtual Result< FSDKError > estimate(const Landmarks68 &landmarks, HeadPoseEstimation &out) const noexcept=0
Estimate the angles.
float yaw
Yaw angle estimation.
Definition: IHeadPoseEstimator.h:28
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.
Object system types and interfaces.
Common SDK error codes.
Base strong reference counted object interface.
Definition: IRefCounted.h:36
Non-frontal face.
Definition: IHeadPoseEstimator.h:32
Good for recognition; Doesn&#39;t descrease recall and looks fine.
Definition: IHeadPoseEstimator.h:33
FrontalFaceType getFrontalFaceType() const
Returns type of face frontality.
Definition: IHeadPoseEstimator.h:123
Image.
Definition: Image.h:39
GOST/ISO angles.
Definition: IHeadPoseEstimator.h:34
FrontalFaceType
Definition: IHeadPoseEstimator.h:31
float pitch
Pitch angle estimation.
Definition: IHeadPoseEstimator.h:27
Head pose angles estimator interface.
Definition: IHeadPoseEstimator.h:53
Detection structure. Stores a detected bounding box within a source image rect.
Definition: Detection.h:10
Span. Not owning data view. It incapsulated pointer to the continuous array with one or more T objec...
Definition: Span.h:14