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

HumanLandmarks.h
1 #pragma once
2
3 #include <fsdk/Types.h>
4 #include <fsdk/Optional.h>
5
6 namespace fsdk {
7 struct HumanLandmark {
8 HumanLandmark() = default;
9 explicit HumanLandmark(float s, const fsdk::Point2f& p)
10 : score{ s },
11 point{ p }
12 {}
13
14 float score{ 0.0f };
15 fsdk::Point2f point{ 0.0f, 0.0f };
16 };
17
21 template<size_t numOfLandmarks = 17>
22 struct HumanLandmarks {
23 // element access
24 const HumanLandmark& operator [](int idx) const noexcept {
25 assert(idx < numOfLandmarks);
26 return landmarks[idx];
27 }
28
29 HumanLandmark& operator [](int idx) noexcept {
30 assert(idx < numOfLandmarks);
31 return landmarks[idx];
32 }
33
34 static constexpr size_t landmarksCount = numOfLandmarks;
35 // Detected landmarks.
36 HumanLandmark landmarks[landmarksCount];
37 };
38
40 using HumanLandmarks17 = HumanLandmarks<17>;
41 }
fsdk
SDK namespace.
Definition: IAGSEstimator.h:8
Types.h
Common data types and structures.
fsdk::HumanLandmarks
Human keypoints landmarks template structure.
Definition: HumanLandmarks.h:22
fsdk::HumanLandmark
Definition: HumanLandmarks.h:7
fsdk::Vector2< float >