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

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