![]() |
Face Engine SDK
5.17.0
A face detection, recognition and tracking engine.
|
00001 #pragma once 00002 00003 #include <fsdk/Types.h> 00004 #include <fsdk/Optional.h> 00005 00006 namespace fsdk { 00010 struct HumanLandmark { 00011 HumanLandmark() = default; 00012 explicit HumanLandmark(float s, const fsdk::Point2f& p) 00013 : score{ s } 00014 , point{ p } 00015 {} 00017 float score{ 0.0f }; 00020 fsdk::Point2f point{ 0.0f, 0.0f }; 00022 bool visible = false; 00023 }; 00024 00028 template<size_t numOfLandmarks = 17> 00029 struct HumanLandmarks { 00030 // element access 00031 const HumanLandmark& operator [](int idx) const noexcept { 00032 assert(idx < numOfLandmarks); 00033 return landmarks[idx]; 00034 } 00035 00036 HumanLandmark& operator [](int idx) noexcept { 00037 assert(idx < numOfLandmarks); 00038 return landmarks[idx]; 00039 } 00040 00041 constexpr size_t size() const noexcept { 00042 return numOfLandmarks; 00043 } 00044 00045 // FSDK_DEPRECATED("landmarkCount deprecated. Use size() method to get length") 00046 static constexpr size_t landmarksCount = numOfLandmarks; 00047 // Detected landmarks. 00048 HumanLandmark landmarks[numOfLandmarks]; 00049 }; 00050 00052 using HumanLandmarks17 = HumanLandmarks<17>; 00053 }