Face Engine SDK  4.6.0
A face detection, recognition and tracking engine.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 
41 }
Common data types and structures.
Human keypoints landmarks template structure.
Definition: HumanLandmarks.h:22
Definition: HumanLandmarks.h:7