Face Engine SDK  4.9.0
A face detection, recognition and tracking engine.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 
53  FSDK_DEPRECATED("virtual ResultValue<FSDKError,float> estimate(const fsdk::Image& depth)"
54  " is deprecated since v3.8.8, please use "
55  "virtual ResultValue<FSDKError, DepthEstimation> estimate(const fsdk::Image& depth)"
56  " instead")
57  virtual ResultValue<FSDKError,float> estimate(
58  const fsdk::Image& depth) const noexcept = 0;
59 
66  virtual Result<FSDKError> estimate(
67  const fsdk::Image& depth,
68  fsdk::DepthEstimation& out) const noexcept = 0;
69 
76  FSDK_DEPRECATED("setRange is deprecated since v3.8.8, please configure depth estimator "
77  "via faceengine.conf file instead")
78  virtual bool setRange(const DepthRange& range) noexcept = 0;
79  };
80 
81 } // namespace fsdk
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
bool isReal
boolean flag that indicates whether a person is real.
Definition: ILivenessDepthEstimator.h:37
Common data types and structures.
Depth range configuration structure in millimeters.
Definition: ILivenessDepthEstimator.h:20
bool isOk() const noexcept
Definition: ILivenessDepthEstimator.h:27
Object system types and interfaces.
Common SDK error codes.
float min
Minimum distance.
Definition: ILivenessDepthEstimator.h:21
Base strong reference counted object interface.
Definition: IRefCounted.h:36
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
Addon for Result to output some value aside the result. Specialization for copiable types...
Definition: ResultValue.h:21
Depth estimator interface.
Definition: ILivenessDepthEstimator.h:45
Image.
Definition: Image.h:38
Depth estimator output structure.
Definition: ILivenessDepthEstimator.h:35
FSDK_DEPRECATED("virtual ResultValue<FSDKError,float> estimate(const fsdk::Image& depth)"" is deprecated since v3.8.8, please use ""virtual ResultValue<FSDKError, DepthEstimation> estimate(const fsdk::Image& depth)"" instead") virtual ResultValue< FSDKError
Check whether or not depth map corresponds to the real person.
float max
Maximum distance.
Definition: ILivenessDepthEstimator.h:22