Face Engine SDK  4.7.0
A face detection, recognition and tracking engine.
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 
22  float pitch;
23  float yaw;
24  float roll;
25 
30  };
31 
35  inline FrontalFaceType getFrontalFaceType() const;
36  };
37 
56  const Landmarks68 &landmarks,
57  HeadPoseEstimation& out) const noexcept = 0;
65  virtual Result<FSDKError>
67  const fsdk::Image& image,
68  const fsdk::Detection& detection,
69  HeadPoseEstimation& out) const noexcept = 0;
78  virtual Result<FSDKError>
80  const fsdk::Image images[],
81  const fsdk::Detection detections[],
82  const uint32_t batchSize,
83  HeadPoseEstimation out[]) const noexcept = 0;
84  };
85 
86  /*
87  Implementation details.
88  */
91  if(std::abs(roll) <= 8 && std::abs(pitch) <= 5 && std::abs(yaw) <= 5)
93  if(std::abs(roll) <= 30 && std::abs(pitch) <= 40 && std::abs(yaw) <= 40)
96  }
97 
98 } // namespace fsdk
fsdk::HeadPoseEstimation::yaw
float yaw
Yaw angle estimation.
Definition: IHeadPoseEstimator.h:23
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
fsdk::HeadPoseEstimation::getFrontalFaceType
FrontalFaceType getFrontalFaceType() const
Returns type of face frontality.
Definition: IHeadPoseEstimator.h:90
fsdk
SDK namespace.
Definition: IAGSEstimator.h:8
fsdk::IHeadPoseEstimator::estimate
virtual Result< FSDKError > estimate(const Landmarks68 &landmarks, HeadPoseEstimation &out) const noexcept=0
Estimate the angles.
fsdk::Landmarks
Face landmarks template structure.
Definition: Landmarks.h:18
fsdk::IHeadPoseEstimator::estimate
virtual Result< FSDKError > estimate(const fsdk::Image images[], const fsdk::Detection detections[], const uint32_t batchSize, HeadPoseEstimation out[]) const noexcept=0
Estimate headpose angles of multiple frames in a single estimate function call.
fsdk::HeadPoseEstimation::roll
float roll
Roll angle estimation.
Definition: IHeadPoseEstimator.h:24
fsdk::HeadPoseEstimation
Head pose estimation output.
Definition: IHeadPoseEstimator.h:21
fsdk::Result< FSDKError >
fsdk::IHeadPoseEstimator::estimate
virtual Result< FSDKError > estimate(const fsdk::Image &image, const fsdk::Detection &detection, HeadPoseEstimation &out) const noexcept=0
Estimate the angles.
fsdk::HeadPoseEstimation::pitch
float pitch
Pitch angle estimation.
Definition: IHeadPoseEstimator.h:22
fsdk::HeadPoseEstimation::FrontalFace2
@ FrontalFace2
GOST/ISO angles.
Definition: IHeadPoseEstimator.h:29
fsdk::Image
Image.
Definition: Image.h:38
fsdk::HeadPoseEstimation::FrontalFaceType
FrontalFaceType
Definition: IHeadPoseEstimator.h:26
fsdk::HeadPoseEstimation::FrontalFace0
@ FrontalFace0
Non-frontal face.
Definition: IHeadPoseEstimator.h:27
fsdk::HeadPoseEstimation::FrontalFace1
@ FrontalFace1
Good for recognition; Doesn't descrease recall and looks fine.
Definition: IHeadPoseEstimator.h:28
fsdk::IHeadPoseEstimator
Head pose angles estimator interface.
Definition: IHeadPoseEstimator.h:48
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:36
fsdk::BaseDetection
Face detection. @detail Stores a detected face bounding box within a source image frame as well as de...
Definition: Detection.h:10