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

Landmarks.h
1 #pragma once
2
3 #include <fsdk/Def.h>
4
5 #include <fsdk/Types/Vector2.h>
6
7 #include <iterator>
8 #include <cstdint>
9 #include <algorithm>
10
11 namespace fsdk {
13 typedef Vector2<float> Landmark;
14
20 template<size_t numOfLandmarks>
21 struct Landmarks {
22 static constexpr uint64_t landmarkCount = numOfLandmarks;
23
25 Landmark landmarks[landmarkCount];
26
27 Landmarks() = default;
28 ~Landmarks() = default;
29
30 Landmarks(const Landmarks& cp) {
31 *this = cp;
32 }
33
34 Landmarks(Landmarks&& mv) {
35 *this = std::move(mv);
36 }
37
38 Landmarks& operator=(const Landmarks& cp) {
39 std::copy(
40 std::begin(cp.landmarks),
41 std::end(cp.landmarks),
42 std::begin(landmarks));
43
44 return *this;
45 }
46
47 Landmarks& operator=(Landmarks&& mv) {
48 std::move(
49 std::begin(mv.landmarks),
50 std::end(mv.landmarks),
51 std::begin(landmarks));
52
53 return *this;
54 }
55 };
56
58 using Landmarks5 = Landmarks<5>;
60 using Landmarks68 = Landmarks<68>;
61
65 struct Landmarks5Indexes {
66 enum {
67 LandmarkLeftEye = 0,
68 LandmarkRightEye,
69 LandmarkNose,
70 LandmarkMouthLeftCorner,
71 LandmarkMouthRightCorner,
72 LandmarkCount
73 };
74 };
75
81 Landmarks5 FSDK_API convert(const Landmarks68& landmarks);
82 }
fsdk::Landmarks5Indexes
Enumerates detected landmarks. Only valid for template with 5 landmarks.
Definition: Landmarks.h:65
FSDK_API
#define FSDK_API
Dummy.
Definition: Def.h:27
fsdk
SDK namespace.
Definition: IAGSEstimator.h:8
fsdk::Landmarks
Face landmarks template structure.
Definition: Landmarks.h:21
fsdk::Landmarks5Indexes::LandmarkCount
Not a landmark; counts number of detected landmarks.
Definition: Landmarks.h:72
Def.h
Common SDK definitions.
fsdk::Landmarks5Indexes::LandmarkMouthRightCorner
Mouth right corner. Same as FL_MOUTH_RIGHT_CORENR.
Definition: Landmarks.h:71
fsdk::Landmarks5Indexes::LandmarkLeftEye
Left eye center.
Definition: Landmarks.h:67
fsdk::convert
Landmarks5 FSDK_API convert(const Landmarks68 &landmarks)
convert landmarks68 into landmarks5
fsdk::Landmarks5Indexes::LandmarkRightEye
Right eye center.
Definition: Landmarks.h:68
fsdk::Landmarks68
Landmarks< 68 > Landmarks68
alias for structure with 68 landmarks
Definition: Landmarks.h:60
fsdk::Landmarks5
Landmarks< 5 > Landmarks5
alias for structure with 5 landmarks
Definition: Landmarks.h:58
fsdk::Landmarks5Indexes::LandmarkNose
Nose tip. Same as FL_NOSE_TIP.
Definition: Landmarks.h:69
fsdk::Landmarks5Indexes::LandmarkMouthLeftCorner
Mouth left corner. Same as FL_MOUTH_LEFT_CORNER.
Definition: Landmarks.h:70
fsdk::Landmarks::landmarks
Landmark landmarks[landmarkCount]
Detected landmarks.
Definition: Landmarks.h:25
fsdk::Vector2< float >
fsdk::Landmark
Vector2< float > Landmark
Landmark floating point coordinates type.
Definition: Landmarks.h:13