Face Engine SDK  5.6.0
A face detection, recognition and tracking engine.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
SDK core interfaces

Common interfaces and macros shared across all SDK objects. More...

Classes

struct  fsdk::IFaceEngine
 Root LUNA SDK object interface. More...
 
struct  fsdk::IArchive
 Archive interface. More...
 
struct  fsdk::ISerializableObject
 Serializable object interface. More...
 
struct  fsdk::ErrorTraits< ISerializableObject::Error >
 Specialized for ISerializableObject::SerializationError. More...
 
struct  fsdk::IDataStorageObject
 Data storage object interface helper. More...
 
struct  fsdk::IRefCounted
 Base strong reference counted object interface. More...
 
struct  fsdk::ISettingsProvider
 SDK settings provider interface. More...
 
struct  fsdk::ErrorTraits< ISettingsProvider::Error >
 Specialized for ISettingsProvider::ParseError. More...
 

Macros

#define ALIGN_UP(value, align)
 
#define ALIGNED(x)   __attribute__ ((aligned(x)))
 
#define RESTRICT   __restrict__
 
#define FORCE_INLINE   inline __attribute__ ((always_inline))
 
#define DECLARE_SMARTPTR(X)   struct X; using X##Ptr = fsdk::Ref<X>
 Smart ptr declaration helper macro.
 
#define STRINGIFY2(x)   #x
 Stringification helper macro.
 
#define STRINGIFY(x)   STRINGIFY2(x)
 Stringifies it's argument.
 

Functions

FSDK_API Result< FSDKError > fsdk::activateLicense (ILicense *license, const char *configPath) noexcept
 Makes License activation with some platform specific manner. Network connection is required. More...
 
FSDK_API Result< FSDKError > fsdk::activateLicense (ILicense *license, ISettingsProvider *settings) noexcept
 Makes License activation with some platform specific manner. Network connection is required. More...
 
FSDK_API ResultValue
< FSDKError, IFaceEnginePtr > 
fsdk::createFaceEngine (const char *dataPath=nullptr, const char *configPath=nullptr, const char *runtimePath=nullptr) noexcept
 Create the LUNA SDK root object. More...
 
FSDK_API ResultValue
< FSDKError,
ISettingsProviderPtr > 
fsdk::createSettingsProvider (const char *path) noexcept
 Create a settings provider. More...
 
bool fsdk::ISettingsProvider::Value::setString (const char *string) noexcept
 Set a string value. More...
 
 fsdk::ISettingsProvider::Value::Value (Value &&other)
 
Value & fsdk::ISettingsProvider::Value::operator= (Value &&other)
 
void fsdk::ISettingsProvider::Value::swap (Value &first, Value &second)
 
bool fsdk::ISettingsProvider::Value::getString (char *string) const noexcept
 Get a string value. More...
 
void fsdk::ISettingsProvider::Value::setRect (const Rect &rect) noexcept
 Set a rect value. More...
 
bool fsdk::ISettingsProvider::Value::getRect (Rect *rect) const noexcept
 Get a rect value. More...
 
void fsdk::ISettingsProvider::Value::setSize (const Size &size) noexcept
 Set a size value. More...
 
bool fsdk::ISettingsProvider::Value::getSize (Size *size) const noexcept
 Get a size value. More...
 
void fsdk::ISettingsProvider::Value::setPoint2i (const Point2i &point) noexcept
 Set a Point2i value. More...
 
bool fsdk::ISettingsProvider::Value::getPoint2i (Point2i *point) const noexcept
 Get a Point2i value. More...
 
void fsdk::ISettingsProvider::Value::setPoint2f (const Point2f &point) noexcept
 Set a setPoint2f value. More...
 
bool fsdk::ISettingsProvider::Value::getPoint2f (Point2f *point) const noexcept
 Get a Point2f value. More...
 
void fsdk::ISettingsProvider::Value::setBool (bool x) noexcept
 Set a bool value. More...
 
bool fsdk::ISettingsProvider::Value::getBool (bool *x) const noexcept
 Get a bool value. More...
 
void fsdk::ISettingsProvider::Value::setInt (int x) noexcept
 Set an int value. More...
 
bool fsdk::ISettingsProvider::Value::getInt (int *x) const noexcept
 Get an int value. More...
 
void fsdk::ISettingsProvider::Value::setInt (int x, int y) noexcept
 Set a 2d int value. More...
 
bool fsdk::ISettingsProvider::Value::getInt (int *x, int *y) const noexcept
 Get a 2d int value. More...
 
void fsdk::ISettingsProvider::Value::setInt (int x, int y, int z) noexcept
 Set a 3d int value. More...
 
bool fsdk::ISettingsProvider::Value::getInt (int *x, int *y, int *z) const noexcept
 Get a 3d int value. More...
 
void fsdk::ISettingsProvider::Value::setInt (int x, int y, int z, int w) noexcept
 Set a 4d int value. More...
 
bool fsdk::ISettingsProvider::Value::getInt (int *x, int *y, int *z, int *w) const noexcept
 Get a 4d int value. More...
 
void fsdk::ISettingsProvider::Value::setFloat (float x) noexcept
 Set a float value. More...
 
bool fsdk::ISettingsProvider::Value::getFloat (float *x) const noexcept
 Get a float value. More...
 
void fsdk::ISettingsProvider::Value::setFloat (float x, float y) noexcept
 Set a 2d float value. More...
 
bool fsdk::ISettingsProvider::Value::getFloat (float *x, float *y) const noexcept
 Get a 2d float value. More...
 
void fsdk::ISettingsProvider::Value::setFloat (float x, float y, float z) noexcept
 Set a 3d float value. More...
 
bool fsdk::ISettingsProvider::Value::getFloat (float *x, float *y, float *z) const noexcept
 Get a 3d float value. More...
 
void fsdk::ISettingsProvider::Value::setFloat (float x, float y, float z, float w) noexcept
 Set a 4d float value. More...
 
bool fsdk::ISettingsProvider::Value::getFloat (float *x, float *y, float *z, float *w) const noexcept
 Get a 4d float value. More...
 
float fsdk::ISettingsProvider::Value::asFloat (float defaultValue=0.f) const noexcept
 Safely get a float. More...
 
Point2f fsdk::ISettingsProvider::Value::asPoint2f (const Point2f &defaultValue=Point2f()) const noexcept
 Safely get a Point2f. More...
 
bool fsdk::ISettingsProvider::Value::asBool (bool defaultValue=false) const noexcept
 Safely get a boolean. More...
 
int fsdk::ISettingsProvider::Value::asInt (int defaultValue=0) const noexcept
 Safely get an integer. More...
 
Size fsdk::ISettingsProvider::Value::asSize (const Size &defaultValue=Size()) const noexcept
 Safely get a Size. More...
 
Point2i fsdk::ISettingsProvider::Value::asPoint2i (const Point2i &defaultValue=Point2i()) const noexcept
 Safely get a Point2i. More...
 
Rect fsdk::ISettingsProvider::Value::asRect (const Rect &defaultValue=Rect()) const noexcept
 Safely get a Rect. More...
 
const char * fsdk::ISettingsProvider::Value::asString (const char *defaultValue="") const noexcept
 Safely get a string. More...
 
 fsdk::ISettingsProvider::Key::Key () noexcept
 Initialize an empty key.
 
 fsdk::ISettingsProvider::Key::Key (const char *section, const char *parameter) noexcept
 Initialize a key. More...
 
void fsdk::ISettingsProvider::Key::setSection (const char *section) noexcept
 Set section name. More...
 
void fsdk::ISettingsProvider::Key::setParameter (const char *parameter) noexcept
 Set parameter name. More...
 
bool fsdk::ISettingsProvider::Key::operator< (const ISettingsProvider::Key &other) const noexcept
 Operator Less. More...
 
 fsdk::ISettingsProvider::Desc::Desc () noexcept
 Initialize an empty description.
 
 fsdk::ISettingsProvider::Desc::Desc (const char *desc) noexcept
 Initialize a description. More...
 
void fsdk::ISettingsProvider::Desc::setDesc (const char *desc) noexcept
 Set description text. More...
 
 fsdk::ISettingsProvider::Entry::Entry (const Desc &desc, Value &&value) noexcept
 Initialize an entry. More...
 
void fsdk::ISettingsProvider::Entry::setDesc (const Desc &desc) noexcept
 Set description. More...
 
void fsdk::ISettingsProvider::Entry::setValue (Value &&value) noexcept
 Set value. More...
 

Detailed Description

Common interfaces and macros shared across all SDK objects.

Macro Definition Documentation

#define ALIGN_UP (   value,
  align 
)
Value:
(((value) & (align-1)) ? \
(((value) + (align-1)) & ~(align-1)) : \
(value))

Function Documentation

fsdk::ISettingsProvider::Desc::Desc ( const char *  desc)
inlinenoexcept

Initialize a description.

Parameters
descdescription text.
fsdk::ISettingsProvider::Entry::Entry ( const Desc desc,
Value &&  value 
)
inlinenoexcept

Initialize an entry.

Parameters
descdescription.
valuevalue.
fsdk::ISettingsProvider::Key::Key ( const char *  section,
const char *  parameter 
)
inlinenoexcept

Initialize a key.

Parameters
sectionsection name.
parameterparameter name.
FSDK_API Result<FSDKError> fsdk::activateLicense ( ILicense *  license,
const char *  configPath 
)
noexcept

Makes License activation with some platform specific manner. Network connection is required.

Parameters
[in]licensepointer to the license object which should be activated
[in]configPathpath to license.conf file with licensing settings.
Returns
true if license was successfully activated.
FSDK_API Result<FSDKError> fsdk::activateLicense ( ILicense *  license,
ISettingsProvider *  settings 
)
noexcept

Makes License activation with some platform specific manner. Network connection is required.

Parameters
[in]licensepointer to the license object which should be activated
[in]providersettings provider.
Returns
true if license was successfully activated.
bool ISettingsProvider::Value::asBool ( bool  defaultValue = false) const
inlinenoexcept

Safely get a boolean.

If actual value type is convertible to bool, the value is returned; if not a fallback value is returned.

Parameters
defaultValuefallback value (optional).
Returns
value.
float ISettingsProvider::Value::asFloat ( float  defaultValue = 0.f) const
inlinenoexcept

Safely get a float.

If actual value type is float, the value is returned; if not a fallback value is returned.

Parameters
defaultValuefallback value (optional).
Returns
value.
int ISettingsProvider::Value::asInt ( int  defaultValue = 0) const
inlinenoexcept

Safely get an integer.

If actual value type is Int, the value is returned; if not a fallback value is returned.

Parameters
defaultValuefallback value (optional).
Returns
value.
Point2f ISettingsProvider::Value::asPoint2f ( const Point2f defaultValue = Point2f()) const
inlinenoexcept

Safely get a Point2f.

If actual value type is convertible to Point2f, the value is returned; if not a fallback value is returned.

Parameters
defaultValuefallback value (optional).
Returns
value.
Point2i ISettingsProvider::Value::asPoint2i ( const Point2i defaultValue = Point2i()) const
inlinenoexcept

Safely get a Point2i.

If actual value type is convertible to Point2i, the value is returned; if not a fallback value is returned.

Parameters
defaultValuefallback value (optional).
Returns
value.
Rect ISettingsProvider::Value::asRect ( const Rect defaultValue = Rect()) const
inlinenoexcept

Safely get a Rect.

If actual value type is convertible to Rect, the value is returned; if not a fallback value is returned.

Parameters
defaultValuefallback value (optional).
Returns
value.
Size ISettingsProvider::Value::asSize ( const Size defaultValue = Size()) const
inlinenoexcept

Safely get a Size.

If actual value type is convertible to Size, the value is returned; if not a fallback value is returned.

Parameters
defaultValuefallback value (optional).
Returns
value.
const char * ISettingsProvider::Value::asString ( const char *  defaultValue = "") const
inlinenoexcept

Safely get a string.

If actual value type is String, the value is returned; if not a fallback value is returned.

Note
Doesn't allocate or copy memory.
Parameters
defaultValuefallback value (optional).
Returns
value.
FSDK_API ResultValue<FSDKError, IFaceEnginePtr> fsdk::createFaceEngine ( const char *  dataPath = nullptr,
const char *  configPath = nullptr,
const char *  runtimePath = nullptr 
)
noexcept

Create the LUNA SDK root object.

Parameters
[in]dataPath[optional] path to folder with FSDK data. Default: ./data (on windows), /opt/visionlabs/data (on linux)
[in]configPath[optional] path to faceengine.conf file. Default: <dataPath>/faceengine.conf
[in]runtimePath[optional] path to runtime.conf file. Default: <dataPath>/runtime.conf
Returns
ResultValue with error code and IFaceEnginePtr instance.
See Also
ResultValue, FSDKError, IFaceEnginePtr
FSDK_API fsdk::ResultValue< fsdk::FSDKError, fsdk::ISettingsProviderPtr > fsdk::createSettingsProvider ( const char *  path)
noexcept

Create a settings provider.

Parameters
[in]pathconfiguration file path.
Returns
Error code;
See Also
FSDKError and settings provider object if succeeded, null if failed.
Parameters
[in]pathconfiguration file path.
Returns
settings provider object if succeeded, null if failed.
bool ISettingsProvider::Value::getBool ( bool *  x) const
inlinenoexcept

Get a bool value.

Parameters
[out]xthe value.
Note
function fails if actual value type is not convertible to bool; in this case x isn't modified.
Returns
true if succeeded; false otherwise.
bool fsdk::ISettingsProvider::Value::getFloat ( float *  x) const
inlinenoexcept

Get a float value.

Parameters
[out]xthe value.
Note
function fails if actual value type is not a float; in this case 'x' isn't modified.
Returns
true if succeeded; false otherwise.
bool fsdk::ISettingsProvider::Value::getFloat ( float *  x,
float *  y 
) const
inlinenoexcept

Get a 2d float value.

Parameters
[out]x1st value.
[out]y2nd value.
Note
function fails if actual value type is not a 2d float; in this case output parameters aren't modified.
Returns
true if succeeded; false otherwise.
bool fsdk::ISettingsProvider::Value::getFloat ( float *  x,
float *  y,
float *  z 
) const
inlinenoexcept

Get a 3d float value.

Parameters
[out]x1st value.
[out]y2nd value.
[out]z3rd value.
Note
function fails if actual value type is not a 3d float; in this case output parameters aren't modified.
Returns
true if succeeded; false otherwise.
bool fsdk::ISettingsProvider::Value::getFloat ( float *  x,
float *  y,
float *  z,
float *  w 
) const
inlinenoexcept

Get a 4d float value.

Parameters
[out]x1st value.
[out]y2nd value.
[out]z3rd value.
[out]w4th value.
Note
function fails if actual value type is not a 4d float; in this case output parameters aren't modified.
Returns
true if succeeded; false otherwise.
bool fsdk::ISettingsProvider::Value::getInt ( int *  x) const
inlinenoexcept

Get an int value.

Parameters
[out]xthe value.
Note
function fails if actual value type is not an int; in this case x isn't modified.
Returns
true if succeeded; false otherwise.
bool fsdk::ISettingsProvider::Value::getInt ( int *  x,
int *  y 
) const
inlinenoexcept

Get a 2d int value.

Parameters
[out]x1st value.
[out]y2nd value.
Note
function fails if actual value type is not a 2d int; in this case output parameters aren't modified.
Returns
true if succeeded; false otherwise.
bool fsdk::ISettingsProvider::Value::getInt ( int *  x,
int *  y,
int *  z 
) const
inlinenoexcept

Get a 3d int value.

Parameters
[out]x1st value.
[out]y2nd value.
[out]z3rd value.
Note
function fails if actual value type is not a 3d int; in this case output parameters aren't modified.
Returns
true if succeeded; false otherwise.
bool fsdk::ISettingsProvider::Value::getInt ( int *  x,
int *  y,
int *  z,
int *  w 
) const
inlinenoexcept

Get a 4d int value.

Parameters
[out]x1st value.
[out]y2nd value.
[out]z3rd value.
[out]w4th value.
Note
function fails if actual value type is not a 4d int; in this case output parameters aren't modified.
Returns
true if succeeded; false otherwise.
bool ISettingsProvider::Value::getPoint2f ( Point2f point) const
inlinenoexcept

Get a Point2f value.

Parameters
[out]pointthe value.
Note
function fails if actual value type is not convertible to Point2f; in this case point isn't modified.
Returns
true if succeeded; false otherwise.
bool ISettingsProvider::Value::getPoint2i ( Point2i point) const
inlinenoexcept

Get a Point2i value.

Parameters
[out]pointthe value.
Note
function fails if actual value type is not convertible to Point2i; in this case point isn't modified.
Returns
true if succeeded; false otherwise.
bool ISettingsProvider::Value::getRect ( Rect rect) const
inlinenoexcept

Get a rect value.

Parameters
[out]rectthe value.
Note
function fails if actual value type is not convertible to rect; in this case rect isn't modified.
Returns
true if succeeded; false otherwise.
bool ISettingsProvider::Value::getSize ( Size size) const
inlinenoexcept

Get a size value.

Parameters
[out]sizethe value.
Note
function fails if actual value type is not convertible to size; in this case size isn't modified.
Returns
true if succeeded; false otherwise.
bool ISettingsProvider::Value::getString ( char *  string) const
inlinenoexcept

Get a string value.

Parameters
[out]stringthe value.
Note
function fails if actual value type is not string; in this case string isn't modified.
Returns
true if succeeded; false otherwise.
bool ISettingsProvider::Key::operator< ( const ISettingsProvider::Key other) const
inlinenoexcept

Operator Less.

Parameters
otherother key.
Returns
comparison result.
void ISettingsProvider::Value::setBool ( bool  x)
inlinenoexcept

Set a bool value.

Parameters
xthe value.
void ISettingsProvider::Desc::setDesc ( const char *  desc)
inlinenoexcept

Set description text.

Parameters
descdescription text.
void ISettingsProvider::Entry::setDesc ( const Desc desc)
inlinenoexcept

Set description.

Parameters
descdescription.
void fsdk::ISettingsProvider::Value::setFloat ( float  x)
inlinenoexcept

Set a float value.

Parameters
xthe value.
void fsdk::ISettingsProvider::Value::setFloat ( float  x,
float  y 
)
inlinenoexcept

Set a 2d float value.

Parameters
x1st value.
y2nd value.
void fsdk::ISettingsProvider::Value::setFloat ( float  x,
float  y,
float  z 
)
inlinenoexcept

Set a 3d float value.

Parameters
x1st value.
y2nd value.
z3rd value.
void fsdk::ISettingsProvider::Value::setFloat ( float  x,
float  y,
float  z,
float  w 
)
inlinenoexcept

Set a 4d float value.

Parameters
x1st value.
y2nd value.
z3rd value.
w4th value.
void fsdk::ISettingsProvider::Value::setInt ( int  x)
inlinenoexcept

Set an int value.

Parameters
xthe value.
void fsdk::ISettingsProvider::Value::setInt ( int  x,
int  y 
)
inlinenoexcept

Set a 2d int value.

Parameters
x1st value.
y2nd value.
void fsdk::ISettingsProvider::Value::setInt ( int  x,
int  y,
int  z 
)
inlinenoexcept

Set a 3d int value.

Parameters
x1st value.
y2nd value.
z3rd value.
void fsdk::ISettingsProvider::Value::setInt ( int  x,
int  y,
int  z,
int  w 
)
inlinenoexcept

Set a 4d int value.

Parameters
x1st value.
y2nd value.
z3rd value.
w4th value.
void ISettingsProvider::Key::setParameter ( const char *  parameter)
inlinenoexcept

Set parameter name.

Parameters
parameterparameter name.
void ISettingsProvider::Value::setPoint2f ( const Point2f point)
inlinenoexcept

Set a setPoint2f value.

Parameters
pointthe value.
void ISettingsProvider::Value::setPoint2i ( const Point2i point)
inlinenoexcept

Set a Point2i value.

Parameters
pointthe value.
void ISettingsProvider::Value::setRect ( const Rect rect)
inlinenoexcept

Set a rect value.

Parameters
rectthe value.
void ISettingsProvider::Key::setSection ( const char *  section)
inlinenoexcept

Set section name.

Parameters
sectionsection name.
void ISettingsProvider::Value::setSize ( const Size size)
inlinenoexcept

Set a size value.

Parameters
sizethe value.
bool ISettingsProvider::Value::setString ( const char *  string)
inlinenoexcept

Set a string value.

Parameters
stringthe value.
void ISettingsProvider::Entry::setValue ( Value &&  value)
inlinenoexcept

Set value.

Parameters
valuevalue.