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

ILivenessDepthEstimator.h
1 #pragma once
2
3 #include <fsdk/IObject.h>
4 #include <fsdk/FSDKError.h>
5 #include <fsdk/Optional.h>
6 #include <fsdk/Types.h>
7
8 namespace fsdk {
9
10 #ifndef DOXYGEN_SHOULD_SKIP_THIS
11 DECLARE_SMARTPTR(ILivenessDepthEstimator);
12 #endif
13
20 struct DepthRange {
21 float min = 600.f;
22 float max = 3000.f;
23
27 bool isOk() const noexcept {
28 return ((min >= 0.f) && (max > min));
29 }
30 };
31
35 struct DepthEstimation {
36 float score;
37 bool isReal;
38 };
39
45 struct ILivenessDepthEstimator : IRefCounted {
54 virtual Result<FSDKError> estimate(
55 const Image& depth,
56 DepthEstimation& out) const noexcept = 0;
57 };
58
59 } // namespace fsdk
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
fsdk::DepthEstimation::isReal
bool isReal
boolean flag that indicates whether a person is real.
Definition: ILivenessDepthEstimator.h:37
fsdk
SDK namespace.
Definition: IAGSEstimator.h:8
fsdk::Result
A structure that encapsulates an action result enumeration.
Definition: Result.h:29
Types.h
Common data types and structures.
fsdk::DepthRange
Depth range configuration structure in millimeters.
Definition: ILivenessDepthEstimator.h:20
fsdk::DepthRange::isOk
bool isOk() const noexcept
Definition: ILivenessDepthEstimator.h:27
IObject.h
Object system types and interfaces.
FSDKError.h
Common SDK error codes.
fsdk::DepthRange::min
float min
Minimum distance.
Definition: ILivenessDepthEstimator.h:21
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:36
fsdk::ILivenessDepthEstimator::estimate
virtual Result< FSDKError > estimate(const Image &depth, DepthEstimation &out) const noexcept=0
Check whether or not depth map corresponds to the real person.
fsdk::DepthEstimation::score
float score
confidence score in [0,1] range. The closer the score to 1, the more likely that person is alive...
Definition: ILivenessDepthEstimator.h:36
fsdk::ILivenessDepthEstimator
Depth estimator interface.
Definition: ILivenessDepthEstimator.h:45
fsdk::Image
Image.
Definition: Image.h:38
fsdk::DepthEstimation
Depth estimator output structure.
Definition: ILivenessDepthEstimator.h:35
fsdk::DepthRange::max
float max
Maximum distance.
Definition: ILivenessDepthEstimator.h:22