Face Engine SDK
5.25.0
A face detection, recognition and tracking engine.
|
00001 #pragma once 00002 00003 #include <fsdk/IObject.h> 00004 #include <fsdk/FSDKError.h> 00005 #include <fsdk/Optional.h> 00006 #include <fsdk/Types.h> 00007 00008 namespace fsdk { 00009 00010 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00011 DECLARE_SMARTPTR(IMouthEstimator); 00012 #endif 00013 00023 enum class SmileType { 00024 None, 00025 SmileLips, 00026 SmileOpen 00027 }; 00028 00035 struct SmileTypeScores { 00036 float smileLips; 00037 float smileOpen; 00038 }; 00039 00047 struct MouthEstimation { 00048 float opened; 00049 float smile; 00050 float occluded; 00051 bool isOpened; 00052 bool isSmiling; 00053 bool isOccluded; 00054 }; 00055 00063 struct MouthEstimationExtended { 00064 float opened; 00065 float smile; 00066 float occluded; 00067 bool isOpened; 00068 bool isSmiling; 00069 bool isOccluded; 00070 00071 SmileTypeScores smileTypeScores; 00072 SmileType smileType; 00073 }; 00074 00079 struct IMouthEstimator : IRefCounted { 00088 virtual Result<FSDKError> estimate(const Image& warp, MouthEstimation& estimation) const noexcept = 0; 00089 00101 virtual Result<FSDKError> 00102 estimate(Span<const Image> warps, Span<MouthEstimation> mouthEstimations) const noexcept = 0; 00103 00112 virtual Result<FSDKError> 00113 estimate(const Image& warp, MouthEstimationExtended& estimation) const noexcept = 0; 00114 00126 virtual Result<FSDKError> 00127 estimate(Span<const Image> warps, Span<MouthEstimationExtended> mouthEstimations) const noexcept = 0; 00128 00139 virtual Result<FSDKError> 00140 validate(Span<const Image> warps, Span<Result<FSDKError>> errors) const noexcept = 0; 00141 }; 00142 00144 } // namespace fsdk