3DiVi Face SDK  3.24.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups
VDT.FaceRecognition.SDK.FacerecService Class Reference

Interface object for creating other interface objects. More...

Classes

class  Config
 Used to override configuration parameters at runtime. More...
 
struct  License
 Storing the license as a string variable. More...
 
class  LicenseState
 License status. More...
 

Public Member Functions

String getVersion ()
 Get version of face recognition library. Thread-safe. More...
 
void forceOnlineLicenseUpdate ()
 Force online license update.
 
Capturer createCapturer (Config config)
 Creates a Capturer object. Type and features depend on the content of the configuration file. Thread-safe. More...
 
Capturer createCapturer (string ini_file)
 Creates a Capturer object. Type and features depend on the content of the configuration file. Thread-safe. More...
 
AgeGenderEstimator createAgeGenderEstimator (String ini_file)
 Creates a AgeGenderEstimator object. Thread-safe. More...
 
QualityEstimator createQualityEstimator (String ini_file)
 Creates a QualityEstimator object. Thread-safe. More...
 
FaceQualityEstimator createFaceQualityEstimator (String ini_file)
 Creates a FaceQualityEstimator object. Thread-safe. More...
 
LivenessEstimator createLivenessEstimator ()
 Creates a LivenessEstimator object. Thread-safe. More...
 
EmotionsEstimator createEmotionsEstimator (String ini_file)
 Creates a EmotionsEstimator object. Thread-safe. More...
 
Recognizer createRecognizer (String ini_file, bool processing, bool matching, bool processing_less_memory_consumption)
 Creates a Recognizer object. Thread-safe. More...
 
Recognizer createRecognizer (Config recognizer_config, bool processing, bool matching, bool processing_less_memory_consumption)
 Creates a Recognizer object. Thread-safe. More...
 
VideoWorker createVideoWorker (VideoWorker.Params prms)
 Creates a VideoWorker object. Thread-safe.
When VideoWorker is created with matching_thread=0 and processing_thread=0, then the standard Capturer license is used.
Depending on the settings, VideoWorker uses either the VideoClient license (face tracking on video streams) or the VideoClientExt license (face tracking, template creation and matching with the database). More...
 
VideoWorker createVideoWorker (Config video_worker_config, String recognizer_ini_file, int streams_count, int processing_threads_count, int matching_threads_count)
 
VideoWorker createVideoWorker (Config video_worker_config, Config recognizer_config, int streams_count, int processing_threads_count, int matching_threads_count)
 
RawSample loadRawSample (Stream binary_stream)
 Loads a RawSample object that was saved with the RawSample.save member function. The format is platform-independent. Thread-safe. More...
 
RawSample loadRawSampleWithoutImage (Stream binary_stream, RawImage image, double space_translation_x=0, double space_translation_y=0, double space_scale=1)
 Loads a RawSample object that was saved with the RawSample.saveWithoutImage member function. If you transformed the image in some way, you can set parameters of coordinate space transformation: (x, y) -> ( (x + space_translation_x) * space_scale, (y + space_translation_y) * space_scale ) that will be applied to the information about face position. Note that you must set parameters of the same transformation only once: either during serialization or during deserialization, otherwise transformation will be applied twice which is wrong. The format is platform-independent. Thread-safe. More...
 
RawSample loadRawSampleWithoutImage (Stream binary_stream, byte[] image_data, double space_translation_x=0, double space_translation_y=0, double space_scale=1)
 
CameraCalibrator createCameraCalibrator ()
 Creates a CameraCalibrator object. Thread-safe. More...
 
DepthLivenessEstimator createDepthLivenessEstimator (Config config)
 Creates a DepthLivenessEstimator object. Thread-safe. More...
 
DepthLivenessEstimator createDepthLivenessEstimator (String ini_file)
 Creates a DepthLivenessEstimator object. Thread-safe. More...
 
Liveness2DEstimator createLiveness2DEstimator (Config config)
 Creates a Liveness2DEstimator object. Thread-safe. More...
 
FaceAttributesEstimator createFaceAttributesEstimator (String ini_file)
 Creates an FaceAttributesEstimator object. Thread-safe. More...
 
Liveness2DEstimator createLiveness2DEstimator (String ini_file)
 Creates a Liveness2DEstimator object. Thread-safe. More...
 
LicenseState getLicenseState ()
 Get the license state. Thread-safe. More...
 
void keepAlgorithmsCache ()
 Enalbe keeping algorithms data in memory even if no owners left. This will speedup repeated algorithms initialization. Thread-safe.
 
void freeAlgorithmsCache ()
 Disable keeping algorithms data in memory. Thread-safe.
 
unsafe ProcessingBlock CreateProcessingBlock (Dictionary< object, object > ctx)
 creates a processing block More...
 
unsafe Context CreateContext (object ctx)
 creates a container-Context More...
 
unsafe Context CreateContextFromImage (byte[] data)
 creates a container-Context from an encoded image More...
 
unsafe Context CreateContextFromEncodedImage (byte[] data)
 creates a container-Context from an encoded image More...
 
unsafe Context CreateContextFromFrame (byte[] data, int width, int height, Context.Format format=Context.Format.FORMAT_BGR, int baseAngle=0)
 creates a container-Context from an image More...
 
unsafe Context CreateContextFromJsonFile (string path)
 creates a container-Context from a json file More...
 
- Public Member Functions inherited from VDT.FaceRecognition.SDK.IDisposableObject
virtual void Dispose ()
 Release internal object.
 

Static Public Member Functions

static FacerecService createService (String facerec_conf_dir, String license_dir)
 Initializes the facerec lib (can be called only once). More...
 
static FacerecService createService (String facerec_conf_dir, FacerecService.License license)
 Initializes the facerec lib (can be called only once). More...
 

Additional Inherited Members

- Properties inherited from VDT.FaceRecognition.SDK.IDisposableObject
bool isDisposed [get]
 True if internal object already disposed.
 

Detailed Description

Interface object for creating other interface objects.

Member Function Documentation

AgeGenderEstimator VDT.FaceRecognition.SDK.FacerecService.createAgeGenderEstimator ( String  ini_file)
inline

Creates a AgeGenderEstimator object. Thread-safe.

Parameters
[in]ini_fileName of the config file.
Returns
Created AgeGenderEstimator object.
CameraCalibrator VDT.FaceRecognition.SDK.FacerecService.createCameraCalibrator ( )
inline

Creates a CameraCalibrator object. Thread-safe.

Returns
Created CameraCalibrator object.
Capturer VDT.FaceRecognition.SDK.FacerecService.createCapturer ( Config  config)
inline

Creates a Capturer object. Type and features depend on the content of the configuration file. Thread-safe.

Parameters
[in]configСonfiguration file with optionally overridden parameters.
Returns
Created Capturer object.
Capturer VDT.FaceRecognition.SDK.FacerecService.createCapturer ( string  ini_file)
inline

Creates a Capturer object. Type and features depend on the content of the configuration file. Thread-safe.

Parameters
[in]ini_fileName of the config file.
Returns
Created Capturer object.
unsafe Context VDT.FaceRecognition.SDK.FacerecService.CreateContext ( object  ctx)
inline

creates a container-Context

Returns
container-Context
unsafe Context VDT.FaceRecognition.SDK.FacerecService.CreateContextFromEncodedImage ( byte[]  data)
inline

creates a container-Context from an encoded image

Parameters
[in]data- image data in vector
Returns
container-Context
unsafe Context VDT.FaceRecognition.SDK.FacerecService.CreateContextFromFrame ( byte[]  data,
int  width,
int  height,
Context.Format  format = Context.Format.FORMAT_BGR,
int  baseAngle = 0 
)
inline

creates a container-Context from an image

Parameters
[in]data- image bytes
[in]width- the width of the image in pixels
[in]height- the height of the image in pixels
[in]format- image format
[in]base_angle- the type of angle the purpose of which the image is expanded
Returns
container-Context
unsafe Context VDT.FaceRecognition.SDK.FacerecService.CreateContextFromImage ( byte[]  data)
inline

creates a container-Context from an encoded image

Parameters
[in]data- image data in vector
Returns
container-Context
unsafe Context VDT.FaceRecognition.SDK.FacerecService.CreateContextFromJsonFile ( string  path)
inline

creates a container-Context from a json file

Parameters
[in]path- path to the json file
Returns
container-Context
DepthLivenessEstimator VDT.FaceRecognition.SDK.FacerecService.createDepthLivenessEstimator ( Config  config)
inline

Creates a DepthLivenessEstimator object. Thread-safe.

Parameters
[in]configСonfiguration file with optionally overridden parameters.
Returns
Created DepthLivenessEstimator object.
DepthLivenessEstimator VDT.FaceRecognition.SDK.FacerecService.createDepthLivenessEstimator ( String  ini_file)
inline

Creates a DepthLivenessEstimator object. Thread-safe.

Parameters
[in]ini_fileName of the config file.
Returns
Created DepthLivenessEstimator object.
EmotionsEstimator VDT.FaceRecognition.SDK.FacerecService.createEmotionsEstimator ( String  ini_file)
inline

Creates a EmotionsEstimator object. Thread-safe.

Parameters
[in]ini_fileName of the config file.
Returns
Created EmotionsEstimator object.
FaceAttributesEstimator VDT.FaceRecognition.SDK.FacerecService.createFaceAttributesEstimator ( String  ini_file)
inline

Creates an FaceAttributesEstimator object. Thread-safe.

Parameters
[in]ini_fileName of the configuration file.
Returns
Created FaceAttributesEstimator object.
FaceQualityEstimator VDT.FaceRecognition.SDK.FacerecService.createFaceQualityEstimator ( String  ini_file)
inline

Creates a FaceQualityEstimator object. Thread-safe.

Parameters
[in]ini_fileName of the config file.
Returns
Created FaceQualityEstimator object.
Liveness2DEstimator VDT.FaceRecognition.SDK.FacerecService.createLiveness2DEstimator ( Config  config)
inline

Creates a Liveness2DEstimator object. Thread-safe.

Parameters
[in]configСonfiguration file with optionally overridden parameters.
Liveness2DEstimator VDT.FaceRecognition.SDK.FacerecService.createLiveness2DEstimator ( String  ini_file)
inline

Creates a Liveness2DEstimator object. Thread-safe.

Parameters
[in]ini_fileName of the config file.
Returns
Created Liveness2DEstimator object.
LivenessEstimator VDT.FaceRecognition.SDK.FacerecService.createLivenessEstimator ( )
inline

Creates a LivenessEstimator object. Thread-safe.

Returns
Created LivenessEstimator object.
unsafe ProcessingBlock VDT.FaceRecognition.SDK.FacerecService.CreateProcessingBlock ( Dictionary< object, object >  ctx)
inline

creates a processing block

Parameters
[in]ctx- Dictionary containing the configuration of the processing block
Returns
processing block
QualityEstimator VDT.FaceRecognition.SDK.FacerecService.createQualityEstimator ( String  ini_file)
inline

Creates a QualityEstimator object. Thread-safe.

Parameters
[in]ini_fileName of the config file.
Returns
Created QualityEstimator object.
Recognizer VDT.FaceRecognition.SDK.FacerecService.createRecognizer ( String  ini_file,
bool  processing,
bool  matching,
bool  processing_less_memory_consumption 
)
inline

Creates a Recognizer object. Thread-safe.

Parameters
[in]ini_fileName of the config file.
[in]processingFlag to toggle the Recognizer.processing method in the created recognizer.
[in]matchingFlag to toggle the Recognizer.verifyMatch method in the created recognizer.
[in]processing_less_memory_consumptionFlag to toggle the Recognizer.processing member function optimizations that consume a lot of RAM when creating the recognizer (see the docs).
Returns
Created Recognizer object.
Recognizer VDT.FaceRecognition.SDK.FacerecService.createRecognizer ( Config  recognizer_config,
bool  processing,
bool  matching,
bool  processing_less_memory_consumption 
)
inline

Creates a Recognizer object. Thread-safe.

Parameters
[in]recognizer_configThe Recognizer configuration file with optionally overridden parameters.
[in]processingFlag to toggle the Recognizer.processing method in the created recognizer.
[in]matchingFlag to toggle the Recognizer.verifyMatch method in the created recognizer.
[in]processing_less_memory_consumptionFlag to toggle the Recognizer.processing member function optimizations that consume a lot of RAM when creating the recognizer (see the docs).
Returns
Created Recognizer object.
static FacerecService VDT.FaceRecognition.SDK.FacerecService.createService ( String  facerec_conf_dir,
String  license_dir 
)
inlinestatic

Initializes the facerec lib (can be called only once).

Parameters
[in]facerec_conf_dirAn absolute or a relative path to the directory with config files (the 'face_sdk/conf/facerec/' directory).
[in]license_dirIf you need to specify the directory containing the license file, then it's an absolute or a relative path to this directory, otherwise, it's an empty string. In case of an empty string, a license file is searched first in the 'face_sdk/license/' directory. If it's not found, it's searched in the 'face_sdk/conf/facerec/' directory.
Returns
Created FacerecService object.
static FacerecService VDT.FaceRecognition.SDK.FacerecService.createService ( String  facerec_conf_dir,
FacerecService.License  license 
)
inlinestatic

Initializes the facerec lib (can be called only once).

Parameters
[in]dll_pathAn absolute or a relative path to libfacerec.so on Linux or facerec.dll on Windows.
[in]facerec_conf_dirAn absolute or a relative path to the directory with config files (the 'face_sdk/conf/facerec/' directory).
[in]licenseYou can transfer the license content as a string (see FacerecService.License)
Returns
Created FacerecService object.
VideoWorker VDT.FaceRecognition.SDK.FacerecService.createVideoWorker ( VideoWorker.Params  prms)
inline

Creates a VideoWorker object. Thread-safe.
When VideoWorker is created with matching_thread=0 and processing_thread=0, then the standard Capturer license is used.
Depending on the settings, VideoWorker uses either the VideoClient license (face tracking on video streams) or the VideoClientExt license (face tracking, template creation and matching with the database).

Parameters
[in]prmsParameters of the VideoWorker constructor.
Returns
Created VideoWorker object.
VideoWorker VDT.FaceRecognition.SDK.FacerecService.createVideoWorker ( Config  video_worker_config,
String  recognizer_ini_file,
int  streams_count,
int  processing_threads_count,
int  matching_threads_count 
)
inline
Parameters
[in]video_worker_configThe VideoWorker configuration file with optionally overridden parameters.
[in]recognizer_ini_fileName of the config file for the Recognizer that will be used inside the VideoWorker.
[in]streams_countNumber of video streams.
[in]processing_threads_countNumber of threads for creating templates.
[in]matching_threads_countNumber of threads for matching templates with the database.
Returns
Created VideoWorker object.
VideoWorker VDT.FaceRecognition.SDK.FacerecService.createVideoWorker ( Config  video_worker_config,
Config  recognizer_config,
int  streams_count,
int  processing_threads_count,
int  matching_threads_count 
)
inline
Parameters
[in]video_worker_configThe VideoWorker configuration file with optionally overridden parameters.
[in]recognizer_configThe Recognizer configuration file with optionally overridden parameters.
[in]streams_countNumber of video streams.
[in]processing_threads_countNumber of threads for creating templates.
[in]matching_threads_countNumber of threads for matching templates with the database.
Returns
Created VideoWorker object.
LicenseState VDT.FaceRecognition.SDK.FacerecService.getLicenseState ( )
inline

Get the license state. Thread-safe.

Returns
License state.
String VDT.FaceRecognition.SDK.FacerecService.getVersion ( )
inline

Get version of face recognition library. Thread-safe.

Returns
The version of face recognition library.
RawSample VDT.FaceRecognition.SDK.FacerecService.loadRawSample ( Stream  binary_stream)
inline

Loads a RawSample object that was saved with the RawSample.save member function. The format is platform-independent. Thread-safe.

Parameters
[in]binary_streamInput stream object.
Returns
Loaded RawSample object.
RawSample VDT.FaceRecognition.SDK.FacerecService.loadRawSampleWithoutImage ( Stream  binary_stream,
RawImage  image,
double  space_translation_x = 0,
double  space_translation_y = 0,
double  space_scale = 1 
)
inline

Loads a RawSample object that was saved with the RawSample.saveWithoutImage member function. If you transformed the image in some way, you can set parameters of coordinate space transformation: (x, y) -> ( (x + space_translation_x) * space_scale, (y + space_translation_y) * space_scale ) that will be applied to the information about face position. Note that you must set parameters of the same transformation only once: either during serialization or during deserialization, otherwise transformation will be applied twice which is wrong. The format is platform-independent. Thread-safe.

Parameters
[in]binary_streamInput stream object.
[in]imageImage.
[in]space_translation_xCoordinate space transform parameter.
[in]space_translation_yCoordinate space transform parameter.
[in]space_scaleCoordinate space transform parameter.
Returns
Loaded RawSample object.
RawSample VDT.FaceRecognition.SDK.FacerecService.loadRawSampleWithoutImage ( Stream  binary_stream,
byte[]  image_data,
double  space_translation_x = 0,
double  space_translation_y = 0,
double  space_scale = 1 
)
inline

Loads a RawSample object that was saved with the RawSample.saveWithoutImage member function. If you transformed the image in some way, you can set parameters of coordinate space transformation: (x, y) -> ( (x + space_translation_x) * space_scale, (y + space_translation_y) * space_scale ) that will be applied to the information about face position. Note that you must set parameters of the same transformation only once: either during serialization or during deserialization, otherwise transformation will be applied twice which is wrong. The format is platform-independent. Thread-safe.

Parameters
[in]binary_streamInput stream object.
[in]image_dataAn array of bytes of the encoded image with 8 or 24 bits per pixel. Supported formats are JPEG, PNG, TIF, and BMP.
[in]space_translation_xCoordinate space transform parameter.
[in]space_translation_yCoordinate space transform parameter.
[in]space_scaleCoordinate space transform parameter.
Returns
Loaded RawSample object.