Face Engine SDK  4.6.0
A face detection, recognition and tracking engine.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
fsdk Namespace Reference

SDK namespace. More...

Classes

struct  IAGSEstimator
 Approximate Garbage Score estimator interface. More...
 
struct  IBestShotQualityEstimator
 BestShot and Quality estimator interface. More...
 
struct  EyesEstimation
 Eyes estimation output. More...
 
struct  EyeCropper
 EyeCropper is a helper structure for IEyeEstimator interface Methods of this structure crop an input warped image and returns rectangle coordinates of each eye. More...
 
struct  IEyeEstimator
 Eye estimator interface. More...
 
struct  HeadPoseEstimation
 Head pose estimation output. More...
 
struct  IHeadPoseEstimator
 Head pose angles estimator interface. More...
 
struct  Face
 
struct  ErrorTraits< FSDKError >
 Specialized for FSDKError. More...
 
struct  Human
 
struct  IAsyncContext
 Interface for running tasks asynchronously. More...
 
struct  MatchingResult
 Result of descriptor matching. More...
 
struct  IDescriptor
 Descriptor interface. More...
 
struct  IDescriptorBatch
 Descriptor batch interface. More...
 
struct  ErrorTraits< IDescriptorBatch::Error >
 Specialized for DescriptorBatchError. More...
 
struct  IDescriptorExtractor
 Descriptor extractor interface. More...
 
struct  IDescriptorMatcher
 Descriptor matcher interface. More...
 
class  IDetectionComparer
 Interface of BestDetection comparer. Implement it if you want to use own BestDetection strategy. More...
 
class  FunctionDetectionComparer
 Syntax sugar, allows you to use lambdas to define a BestDetection comparer. More...
 
struct  IDetector
 face detector interface. More...
 
struct  IHumanDetector
 human body detector interface. More...
 
struct  IFaceEngineMobile
 Root LUNA SDK object interface. More...
 
struct  IHumanWarper
 Human detection area warper interface. More...
 
struct  SearchResult
 Result of index search. More...
 
struct  IStaticDescriptorStorage
 Static descriptor storage interface. More...
 
struct  IDynamicDescriptorStorage
 Dynamic descriptor storage interface. More...
 
struct  IIndex
 Base index interface. More...
 
struct  IDenseIndex
 Dense (read only) index interface. More...
 
struct  IDynamicIndex
 Dynamic index interface. More...
 
struct  IProgressTracker
 Progress tracker interface. More...
 
struct  IIndexBuilder
 Index builder interface. More...
 
struct  ILicense
 License objects interface. More...
 
struct  IArchive
 Archive interface. More...
 
struct  ISerializableObject
 Serializable object interface. More...
 
struct  ErrorTraits< ISerializableObject::Error >
 Specialized for ISerializableObject::SerializationError. More...
 
struct  IDataStorageObject
 Data storage object interface helper. More...
 
struct  IRefCounted
 Base strong reference counted object interface. More...
 
struct  IResultBatch
 
struct  ISettingsProvider
 SDK settings provider interface. More...
 
struct  ErrorTraits< ISettingsProvider::Error >
 Specialized for ISettingsProvider::ParseError. More...
 
struct  Transformation
 Transformation data structure, used for warping. More...
 
struct  IWarper
 Face detection area warper interface. More...
 
struct  In_place_t
 
class  Optional
 
struct  BaseDetection
 Face detection. Stores a detected face bounding box within a source image frame as well as detection confidence score. More...
 
struct  Format
 Image format. More...
 
class  Noncopyable
 Helper class to block copy operator&constructor of its descendants. More...
 
class  Promise
 Promise class to support asynchronous data retrieval Look into std::promise semantics to understand it. More...
 
class  Future
 Future class to support asynchronous data retrieval Look into std::future semantics to understand it. More...
 
struct  ErrorTraits< FutureError >
 Specialized for Future::Error. More...
 
struct  ErrorTraits< PromiseError >
 Specialized for Promise::Error. More...
 
struct  HumanLandmark
 
struct  HumanLandmarks
 Human keypoints landmarks template structure. More...
 
struct  Image
 Image. More...
 
struct  ErrorTraits< Image::Error >
 Specialized for Image::Error. More...
 
struct  Landmarks
 Face landmarks template structure. More...
 
struct  Landmarks5Indexes
 Enumerates detected landmarks. Only valid for template with 5 landmarks. More...
 
struct  MultiError
 An error structure designed for functions which can return errors from different enum classes. More...
 
struct  ErrorTraits< MultiError< E0, E1 > >
 Specialized for MultiError. More...
 
struct  BaseRect
 Rectangle. More...
 
struct  Ref
 Smart pointer for reference counted objects. More...
 
struct  RefBase
 Generic base class of a pointer for reference counted objects. More...
 
struct  ErrorTraits
 
struct  Result
 A structure that encapsulates an action result enumeration. More...
 
struct  ResultValue
 Addon for Result to output some value aside the result. Specialization for copiable types. More...
 
struct  ResultValue< R, V, typename std::enable_if< std::is_copy_constructible< V >::value >::type >
 
struct  ResultValue< R, V, typename std::enable_if< std::is_copy_constructible< V >::value==false >::type >
 Addon for Result to output some value aside the result. Specialization for non copiable types. More...
 
struct  Sizer
 Helper entity to measure size of dynamic objects in memory. More...
 
class  Span
 Span. Not owning data view. It incapsulated pointer to the continuous array with one or more T objects. More...
 
struct  SubImage
 Sub Image. More...
 
struct  Vector2
 Generic 2D vector. More...
 
struct  Version
 

Typedefs

using FaceEngineType = IFaceEngineMobile
 
using FaceEnginePtrType = IFaceEngineMobilePtr
 
using DescriptorId = size_t
 Intergral type used as identification of descriptor in internal storage.
 
typedef BaseDetection< int > Detection
 
using HumanLandmarks17 = HumanLandmarks< 17 >
 alias for structure with 17 landmarks
 
using ImageType = Image::Type
 Convenient type aliases for fsdk::Image enum classes.
 
using ImageError = Image::Error
 
using TargetDevice = Image::TargetDevice
 
using ImageCompression = Image::ImageCompression
 
typedef Vector2< float > Landmark
 Landmark floating point coordinates type.
 
using Landmarks5 = Landmarks< 5 >
 alias for structure with 5 landmarks
 
using Landmarks68 = Landmarks< 68 >
 alias for structure with 68 landmarks
 
using Rect = BaseRect< int >
 
using FloatRect = BaseRect< float >
 
typedef Vector2< float > Point2f
 
typedef Vector2< double > Point2d
 
typedef Vector2< int > Point2i
 
typedef Vector2< unsigned int > Point2u
 
typedef Vector2< unsigned short > Point2us
 
typedef Vector2< int > Size
 

Enumerations

enum  FSDKError : uint32_t {
  FSDKError::Ok, FSDKError::Internal, FSDKError::InvalidInput, FSDKError::InvalidImage,
  FSDKError::InvalidRect, FSDKError::InvalidImageFormat, FSDKError::InvalidImageSize, FSDKError::InvalidDetection,
  FSDKError::InvalidLandmarks5, FSDKError::InvalidLandmarks68, FSDKError::InvalidTransformation, FSDKError::InvalidDescriptor,
  FSDKError::InvalidDescriptorBatch, FSDKError::InvalidSettingsProvider, FSDKError::ModuleNotInitialized, FSDKError::ModuleNotReady,
  FSDKError::LicenseError, FSDKError::BufferIsNull, FSDKError::BufferIsFull, FSDKError::BufferIsEmpty,
  FSDKError::InvalidBufferSize, FSDKError::IncompatibleDescriptors, FSDKError::EnableJustInBetaMode, FSDKError::FiltredAggregationError,
  FSDKError::BatchedInternalError, UnsupportedFunctionality, HighMemoryUsage, FSDKError::IncompatibleModelVersions
}
 Common SDK error codes. More...
 
enum  DesctiptorType { DT_FACE, DT_HUMAN }
 Descriptor type enum. Determines which type of descriptor to use. More...
 
enum  DescriptorVersion : uint32_t { DV_MIN_FACE_DESCRIPTOR_VERSION = 46, DV_MIN_HUMAN_DESCRIPTOR_VERSION = 101 }
 Minimum descriptor model version. Determines which minimum version of descriptor to use. More...
 
enum  RecognitionMode { RM_RGB = 0, RM_INFRA_RED }
 Recognition mode structure. Determines which recognition mode to use. More...
 
enum  ObjectDetectorClassType {
  FACE_DET_DEFAULT = 0, FACE_DET_V1 = 4, FACE_DET_V2 = 5, FACE_DET_V3 = 6,
  FACE_DET_COUNT = 7
}
 Object detector type enumeration. More...
 
enum  DetectionComparerType {
  DCT_CONFIDANCE = 0, DCT_CENTER, DCT_CENTER_AND_CONFIDANCE, DCT_SIZE,
  DCT_COUNT
}
 Strategy of BestDetections comparer. More...
 
enum  DetectionType { dtBBox = 0, dt5Landmarks = 1<<0, dt68Landmarks = 1<<1, dtAll = 0xffff }
 Detection type enumeration. More...
 
enum  HumanDetectionType { DCT_BOX = 0, DCT_POINTS = 1<<0, DCT_ALL = 0xffff }
 Human detection type enumeration. More...
 
enum  LicenseFeature : uint32_t {
  Detection = 1, BestShot = 2, Attributes = 3, Emotions = 4,
  FaceFeatures = 5, Liveness = 6, Descriptor = 7, DescriptorIndex = 8,
  LivenessEngine = 9, TrackEngine = 10, HumanDetection = 11, MedicalMaskDetection = 19
}
 License features.
 
enum  FaceEngineEdition { FrontEndEdition, CompleteEdition }
 
enum  ExecutionPolicy : uint8_t { ExecutionPolicy::Sync, ExecutionPolicy::Async }
 Enum to tell some method how to behave. More...
 
enum  FuturePromiseState : uint8_t {
  FuturePromiseState::Empty, FuturePromiseState::Promised, FuturePromiseState::Fulfilled, FuturePromiseState::CancelRequested,
  FuturePromiseState::Canceled, FuturePromiseState::Failed, FuturePromiseState::Broken
}
 Enumeration of possible future or promise states. More...
 
enum  FutureError : uint8_t {
  FutureError::Ok, FutureError::InvalidInput, FutureError::NotPromised, FutureError::NotFulfilled,
  FutureError::NonWaitable, FutureError::Timeout, FutureError::Internal
}
 Enumeration of possible Future errors. More...
 
enum  PromiseError : uint8_t {
  PromiseError::Ok, PromiseError::Internal, PromiseError::StateNotCancelable, PromiseError::StateNotFailable,
  PromiseError::StateNotFulfillable, PromiseError::StateDoesntAllowFutureCreation
}
 Enumeration of possible Promise errors. More...
 
enum  OrientationType : uint32_t { OT_NORMAL = 0, OT_LEFT = 1, OT_UPSIDE_DOWN = 2, OT_RIGHT = 3 }
 Estimation of image orientation. More...
 

Functions

IBestShotQualityEstimator::EstimationRequest operator| (IBestShotQualityEstimator::EstimationRequest first, IBestShotQualityEstimator::EstimationRequest second)
 
DetectionType operator| (DetectionType a, DetectionType b)
 
HumanDetectionType operator| (HumanDetectionType a, HumanDetectionType b)
 
FSDK_API bool activateLicense (ILicense *license, const char *configPath) noexcept
 Makes License activation with some platform specific manner. Network connection is required. More...
 
FSDK_API IFaceEngineMobilecreateFaceEngineMobile (const char *dataPath=nullptr, const char *configPath=nullptr, const char *runtimePath=nullptr) noexcept
 Create the LUNA SDK root object. More...
 
FSDK_API ISettingsProvidercreateSettingsProvider (const char *path) noexcept
 Create a settings provider. More...
 
template<typename T >
Optional< typename std::decay
< T >::type > 
make_optional (T &&val)
 
template<typename T , typename... Args>
Optional< T > make_optional (Args &&...args)
 
Landmarks5 convert (const Landmarks68 &landmarks)
 convert landmarks68 into landmarks5 More...
 
template<typename E0 , typename E1 >
Result< MultiError< E0, E1 > > makeMultiResult (E0 error0, E1 error1)
 
template<typename Type >
BaseRect< Type > centerScale (const BaseRect< Type > &in, float scaleFactor) noexcept
 scale rect out of center More...
 
template<typename T >
Ref< T > make_ref (T *ptr) noexcept
 Make smart reference to a IRefCounted based object. More...
 
template<typename S , typename T >
Ref< S > make_ref_as (T *ptr) noexcept
 Make smart reference to a IRefCounted based object. More...
 
template<typename T >
Ref< T > acquire (T *ptr) noexcept
 Acquire ownership of IRefCounted based object. More...
 
template<typename S , typename T >
Ref< S > acquire_as (T *ptr) noexcept
 Acquire ownership of IRefCounted based object with a cast to a given type. More...
 
template<typename E >
Result< E > makeResult (E error) noexcept
 
template<typename R , typename V >
ResultValue< R, typename
std::remove_const< typename
std::remove_reference< V >
::type >::type > 
makeResultValue (R result, V &&value) noexcept
 Addon for Result to output some value aside the result. More...
 
bool operator< (Version lhs, Version rhs) noexcept
 Check if one version is less than another. More...
 
bool operator== (Version lhs, Version rhs) noexcept
 Check if versions are equal. More...
 
bool operator!= (Version lhs, Version rhs) noexcept
 Check if versions are not equal. More...
 
FSDK_API Version getVersion () noexcept
 Get FaceEngine version. More...
 
FSDK_API const char * getVersionHash () noexcept
 Get FaceEngine commit hash. More...
 
FSDK_API const char * getVersionString () noexcept
 Get FaceEngine version string. More...
 
FSDK_API const char * getBuildInfo () noexcept
 Get FaceEngine build description. The descripton contains used flags and compler settings. More...
 

Detailed Description

SDK namespace.

Typedef Documentation

typedef Vector2<double> fsdk::Point2d

Double precision floating point 2-dimensional point

typedef Vector2<float> fsdk::Point2f

Single precision floating point 2-dimensional point

typedef Vector2<int> fsdk::Point2i

Integer 2-dimensional point

typedef Vector2<unsigned int> fsdk::Point2u

Integer 2-dimensional point

typedef Vector2<unsigned short> fsdk::Point2us

Integer 2-dimensional point

typedef Vector2<int> fsdk::Size

2-dimensional size type

Enumeration Type Documentation

enum fsdk::ExecutionPolicy : uint8_t
strong

Enum to tell some method how to behave.

Enumerator
Sync 

Execute synchronously.

Async 

Execute asynchronously.

enum fsdk::FSDKError : uint32_t
strong

Common SDK error codes.

Enumerator
Ok 

Ok.

Internal 

Internal error.

InvalidInput 

Invalid input.

InvalidImage 

Invalid image.

InvalidRect 

Invalid rectangle.

InvalidImageFormat 

Invalid image format.

InvalidImageSize 

Invalid image size.

InvalidDetection 

Invalid detection.

InvalidLandmarks5 

Invalid landmarks 5.

InvalidLandmarks68 

Invalid landmarks 68.

InvalidTransformation 

Invalid transformation.

InvalidDescriptor 

Invalid descriptor.

InvalidDescriptorBatch 

Invalid descriptor batch.

InvalidSettingsProvider 

Invalid settings provider.

ModuleNotInitialized 

Module is not initialized.

ModuleNotReady 

Module is not ready.

LicenseError 

Licensing issue (expired license or unavailable feature).

BufferIsNull 

Buffer is null.

BufferIsFull 

Buffer is full.

BufferIsEmpty 

Buffer is empty.

InvalidBufferSize 

Invalid buffer size.

IncompatibleDescriptors 

Matching attempt with incompatible descriptors.

EnableJustInBetaMode 

Attempt to create feature while betaMode is turned off.

FiltredAggregationError 

Cant aggregate descriptors - all images'a GSs are less the threashold.

BatchedInternalError 

Something gone wrong in batched query. See batch with error codes to each input image for details.

IncompatibleModelVersions 

Incompatible model versions.

enum fsdk::FutureError : uint8_t
strong

Enumeration of possible Future errors.

Enumerator
Ok 

All good.

InvalidInput 

Invalid data is given as input to some method.

NotPromised 

Error if you call.

See Also
Future::cancel on not Promised state.
NotFulfilled 

Error if you call.

See Also
Future::takeInto on not Fulfilled state.
NonWaitable 

Error if you try to.

See Also
Future::wait on non waitable state.
Timeout 

Error if your.

See Also
Future::waitFor method ran out of time.
Internal 

Some internal error.

enum fsdk::FuturePromiseState : uint8_t
strong

Enumeration of possible future or promise states.

Enumerator
Empty 

Lack of internal state: on promise creation and emptying Future.

See Also
Future::takeInto.
Promised 

State right after future is created from promise.

Fulfilled 

State possible after Promised if promise' method.

See Also
Promise::fulfill is called.
CancelRequested 

State possible if.

See Also
Future::cancel is called on Promised state.
Canceled 

State possible if during CancelRequested.

See Also
Promise::cancel is called.
Failed 

State possible if during Promised.

See Also
Promise::fail is called.
Broken 

State indicating some internal error.

enum fsdk::OrientationType : uint32_t

Estimation of image orientation.

Enumerator
OT_NORMAL 

Normal orientation of image.

OT_LEFT 

Image is turned right by 90 deg.

OT_UPSIDE_DOWN 

Image is flipped upsidedown.

OT_RIGHT 

Image is turned left by 90 deg.

enum fsdk::PromiseError : uint8_t
strong

Enumeration of possible Promise errors.

Enumerator
Ok 

All good.

Internal 

Internal error.

StateNotCancelable 

Error if you call.

See Also
Promise::cancel on not CancelRequested state.
StateNotFailable 

Error if you call.

See Also
Promise::fail on not Promised and not CancelRequested state.
StateNotFulfillable 

Error if you call.

See Also
Promise::fulfill on not Promised state.
StateDoesntAllowFutureCreation 

Error if you call.

See Also
Promise::future on not Empty state.

Recognition mode structure. Determines which recognition mode to use.

Enumerator
RM_RGB 

RGB image processing mode.

RM_INFRA_RED 

IR image processing mode.

Function Documentation

template<typename T >
Ref<T> fsdk::acquire ( T *  ptr)
inlinenoexcept

Acquire ownership of IRefCounted based object.

Template Parameters
Tobject interface (must be derived from IRefCounted).
Parameters
[in]ptrraw pointer.
template<typename S , typename T >
Ref<S> fsdk::acquire_as ( T *  ptr)
inlinenoexcept

Acquire ownership of IRefCounted based object with a cast to a given type.

Template Parameters
Starget interface (must be relative to T).
Tsource interface (must be derived from IRefCounted).
Parameters
[in]ptrraw pointer.
template<typename Type >
BaseRect<Type> fsdk::centerScale ( const BaseRect< Type > &  in,
float  scaleFactor 
)
noexcept

scale rect out of center

Parameters
[in]inputrect
[in]scaleFactorto scale rect
Returns
scaled rect
Landmarks5 fsdk::convert ( const Landmarks68 &  landmarks)

convert landmarks68 into landmarks5

Parameters
landmarkslandmarks68
Returns
landmarks5
template<typename T >
Ref<T> fsdk::make_ref ( T *  ptr)
inlinenoexcept

Make smart reference to a IRefCounted based object.

Template Parameters
Tobject interface (must be derived from IRefCounted).
Parameters
[in]ptrraw pointer.
template<typename S , typename T >
Ref<S> fsdk::make_ref_as ( T *  ptr)
inlinenoexcept

Make smart reference to a IRefCounted based object.

Template Parameters
Starget interface (must be relative to T).
Tobject interface (must be derived from IRefCounted).
Parameters
[in]ptrraw pointer.
template<typename R , typename V >
ResultValue<R, typename std::remove_const<typename std::remove_reference<V>::type>::type> fsdk::makeResultValue ( result,
V &&  value 
)
inlinenoexcept

Addon for Result to output some value aside the result.

Template Parameters
Rresult enumeration type.
Vresult value type.
Note
All rules for Result template parameter apply to R.
V instance is always held by value despite -> operators.
Parameters
resultthe result.
valuethe value.
Returns
result value struct.