Liveness Engine SDK
Liveness detection engine.
 All Classes Files Functions Enumerations Enumerator Groups Pages
LivenessEngine.h
Go to the documentation of this file.
1 
8 #pragma once
9 
15 #include <fsdk/FaceEngine.h>
16 #include <lsdk/ILiveness.h>
17 
18 namespace lsdk {
19 
20 #ifndef DECLARE_SMARTPTR
21 #ifndef DOXYGEN_SHOULD_SKIP_THIS
22 #define DECLARE_SMARTPTR(X) typedef fsdk::Ref<X> X##Ptr
23 #endif
24 #endif
25 
26 #ifndef DOXYGEN_SHOULD_SKIP_THIS
27  DECLARE_SMARTPTR(ILiveness);
28  DECLARE_SMARTPTR(IComplexLiveness);
29 #endif
30 
39  struct ILivenessEngine : fsdk::IRefCounted {
40 
57  virtual fsdk::ResultValue<fsdk::FSDKError, fsdk::Ref<ILiveness>>
58  createLiveness(LivenessAlgorithmType type) noexcept = 0;
59 
67  virtual fsdk::ResultValue<fsdk::FSDKError, fsdk::Ref<IUnifiedLiveness>>
69 
78  virtual fsdk::ResultValue<fsdk::FSDKError, fsdk::Ref<IComplexLiveness>>
80 
85  virtual void setSettingsProvider(fsdk::ISettingsProvider* provider) noexcept = 0;
86 
91  virtual fsdk::ISettingsProvider* getSettingsProvider() const noexcept = 0;
92 
97  virtual void setDataDirectory(const char* path) noexcept = 0;
98 
104  virtual const char* getDataDirectory() const noexcept = 0;
105  };
106 
107 #ifndef DOXYGEN_SHOULD_SKIP_THIS
108  DECLARE_SMARTPTR(ILivenessEngine);
109 #endif
110 
118  FSDK_API fsdk::ResultValue<fsdk::FSDKError, lsdk::ILivenessEnginePtr>
119  createLivenessEngine(const fsdk::Ref<fsdk::IFaceEngine>& FaceEngine, const char* path = nullptr) noexcept;
120 
122 } // namespace lsdk
ComplexLivenessAlgorithmType
Complex liveness algorithm type enumeration.
Definition: ILiveness.h:39
virtual fsdk::ResultValue< fsdk::FSDKError, fsdk::Ref< IComplexLiveness > > createComplexLiveness(ComplexLivenessAlgorithmType type) noexcept=0
Creates a complex liveness of given type.
FSDK_API fsdk::ResultValue< fsdk::FSDKError, lsdk::ILivenessEnginePtr > createLivenessEngine(const fsdk::Ref< fsdk::IFaceEngine > &FaceEngine, const char *path=nullptr) noexcept
Create the Liveness SDK root object.
LivenessAlgorithmType
Simple liveness algorithm type enumeration.
Definition: ILiveness.h:23
virtual void setSettingsProvider(fsdk::ISettingsProvider *provider) noexcept=0
Sets settings provider.
virtual void setDataDirectory(const char *path) noexcept=0
Sets data directory.
Root Liveness SDK object interface.
Definition: LivenessEngine.h:39
virtual const char * getDataDirectory() const noexcept=0
Gets data directory.
Liveness detection and analysis interfaces.
virtual fsdk::ISettingsProvider * getSettingsProvider() const noexcept=0
Gets settings provider.
virtual fsdk::ResultValue< fsdk::FSDKError, fsdk::Ref< IUnifiedLiveness > > createUnifiedLiveness(LivenessAlgorithmType type) noexcept=0
Creates a unified liveness which performs all possible calculations and tracks value from given type...
virtual fsdk::ResultValue< fsdk::FSDKError, fsdk::Ref< ILiveness > > createLiveness(LivenessAlgorithmType type) noexcept=0
Creates a simple liveness of given type.