3DiVi Face SDK  3.21.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups
com.vdt.face_recognition.sdk.FacerecService Class Reference

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

Classes

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

Public Member Functions

void dispose ()
 Release internal object.
 
boolean isDisposed ()
 Check if an object is released. More...
 
String getVersion ()
 Get version of face recognition library. Thread-safe. More...
 
void forceOnlineLicenseUpdate ()
 Force online license update.
 
Capturer createCapturer (final Config config)
 Creates a Capturer object. Type and features depend on the content of the configuration file. Thread-safe. More...
 
AgeGenderEstimator createAgeGenderEstimator (final String ini_file)
 Creates a AgeGenderEstimator object. Thread-safe. More...
 
QualityEstimator createQualityEstimator (final String ini_file)
 Creates a QualityEstimator object. Thread-safe. More...
 
FaceQualityEstimator createFaceQualityEstimator (final String ini_file)
 Creates a FaceQualityEstimator object. Thread-safe. More...
 
LivenessEstimator createLivenessEstimator ()
 Creates a LivenessEstimator object. Thread-safe. More...
 
EmotionsEstimator createEmotionsEstimator (final String ini_file)
 Creates a EmotionsEstimator object. Thread-safe. More...
 
Recognizer createRecognizer (final String ini_file, final boolean processing, final boolean matching, final boolean processing_less_memory_consumption)
 Creates a Recognizer object. Thread-safe. More...
 
Recognizer createRecognizer (final Config recognizer_config, final boolean processing, final boolean matching, final boolean processing_less_memory_consumption)
 Creates a Recognizer object. Thread-safe. More...
 
VideoWorker createVideoWorker (VideoWorker.Params params)
 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 (final Config video_worker_config, final String recognizer_ini_file, final int streams_count, final int processing_threads_count, final int matching_threads_count)
 
VideoWorker createVideoWorker (final Config video_worker_config, final Config recognizer_config, final int streams_count, final int processing_threads_count, final int matching_threads_count)
 
RawSample loadRawSample (InputStream 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 (InputStream binary_stream, RawImage image)
 Loads a RawSample object that was saved with the RawSample.saveWithoutImage member function. If you transformed the image in some way, you can set the 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 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 (InputStream binary_stream, RawImage image, double space_translation_x, double space_translation_y, double space_scale)
 Loads a RawSample object that was saved with the RawSample.saveWithoutImage member function. If you transformed the image in some way, you can set the 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 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 (InputStream binary_stream, final byte[] encoded_image_data)
 
RawSample loadRawSampleWithoutImage (InputStream binary_stream, final byte[] encoded_image_data, double space_translation_x, double space_translation_y, double space_scale)
 
CameraCalibrator createCameraCalibrator ()
 Creates a CameraCalibrator object. Thread-safe. More...
 
DepthLivenessEstimator createDepthLivenessEstimator (final Config config)
 Creates a DepthLivenessEstimator object. Thread-safe. More...
 
DepthLivenessEstimator createDepthLivenessEstimator (final String ini_file)
 Creates a DepthLivenessEstimator object. Thread-safe. More...
 
IRLivenessEstimator createIRLivenessEstimator (final Config config)
 Creates an IRLivenessEstimator object. Thread-safe. More...
 
IRLivenessEstimator createIRLivenessEstimator (final String ini_file)
 Creates an IRLivenessEstimator object. Thread-safe. More...
 
Liveness2DEstimator createLiveness2DEstimator (final Config config)
 Creates an Liveness2DEstimator object. Thread-safe. More...
 
FaceAttributesEstimator createFaceAttributesEstimator (final String ini_file)
 Creates an FaceAttributesEstimator object. Thread-safe. More...
 
Liveness2DEstimator createLiveness2DEstimator (final String ini_file)
 Creates an 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.
 

Static Public Member Functions

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

Detailed Description

Interface object for creating other interface objects.

Member Function Documentation

AgeGenderEstimator com.vdt.face_recognition.sdk.FacerecService.createAgeGenderEstimator ( final String  ini_file)
inline

Creates a AgeGenderEstimator object. Thread-safe.

Parameters
[in]ini_fileName of the config file.
Returns
Created AgeGenderEstimator object.
CameraCalibrator com.vdt.face_recognition.sdk.FacerecService.createCameraCalibrator ( )
inline

Creates a CameraCalibrator object. Thread-safe.

Returns
Created CameraCalibrator object.
Capturer com.vdt.face_recognition.sdk.FacerecService.createCapturer ( final 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.
DepthLivenessEstimator com.vdt.face_recognition.sdk.FacerecService.createDepthLivenessEstimator ( final Config  config)
inline

Creates a DepthLivenessEstimator object. Thread-safe.

Parameters
[in]configСonfiguration file with optionally overridden parameters.
Returns
Created DepthLivenessEstimator object.
DepthLivenessEstimator com.vdt.face_recognition.sdk.FacerecService.createDepthLivenessEstimator ( final String  ini_file)
inline

Creates a DepthLivenessEstimator object. Thread-safe.

Parameters
[in]ini_fileName of the config file.
Returns
Created DepthLivenessEstimator object.
EmotionsEstimator com.vdt.face_recognition.sdk.FacerecService.createEmotionsEstimator ( final String  ini_file)
inline

Creates a EmotionsEstimator object. Thread-safe.

Parameters
[in]ini_fileName of the config file.
Returns
Created EmotionsEstimator object.
FaceAttributesEstimator com.vdt.face_recognition.sdk.FacerecService.createFaceAttributesEstimator ( final String  ini_file)
inline

Creates an FaceAttributesEstimator object. Thread-safe.

Parameters
[in]ini_fileName of the configuration file.
Returns
Created FaceAttributesEstimator object.
FaceQualityEstimator com.vdt.face_recognition.sdk.FacerecService.createFaceQualityEstimator ( final String  ini_file)
inline

Creates a FaceQualityEstimator object. Thread-safe.

Parameters
[in]ini_fileName of the config file.
Returns
Created FaceQualityEstimator object.
IRLivenessEstimator com.vdt.face_recognition.sdk.FacerecService.createIRLivenessEstimator ( final Config  config)
inline

Creates an IRLivenessEstimator object. Thread-safe.

Parameters
[in]configСonfiguration file with optionally overridden parameters.
Returns
Created IRLivenessEstimator object.
IRLivenessEstimator com.vdt.face_recognition.sdk.FacerecService.createIRLivenessEstimator ( final String  ini_file)
inline

Creates an IRLivenessEstimator object. Thread-safe.

Parameters
[in]ini_fileName of the config file.
Returns
Created IRLivenessEstimator object.
Liveness2DEstimator com.vdt.face_recognition.sdk.FacerecService.createLiveness2DEstimator ( final Config  config)
inline

Creates an Liveness2DEstimator object. Thread-safe.

Parameters
[in]configСonfiguration file with optionally overridden parameters.
Returns
Created Liveness2DEstimator object.
Liveness2DEstimator com.vdt.face_recognition.sdk.FacerecService.createLiveness2DEstimator ( final String  ini_file)
inline

Creates an Liveness2DEstimator object. Thread-safe.

Parameters
[in]ini_fileName of the config file.
Returns
Created Liveness2DEstimator object.
LivenessEstimator com.vdt.face_recognition.sdk.FacerecService.createLivenessEstimator ( )
inline

Creates a LivenessEstimator object. Thread-safe.

Returns
Created LivenessEstimator object.
QualityEstimator com.vdt.face_recognition.sdk.FacerecService.createQualityEstimator ( final String  ini_file)
inline

Creates a QualityEstimator object. Thread-safe.

Parameters
[in]ini_fileName of the config file.
Returns
Created QualityEstimator object.
Recognizer com.vdt.face_recognition.sdk.FacerecService.createRecognizer ( final String  ini_file,
final boolean  processing,
final boolean  matching,
final boolean  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 com.vdt.face_recognition.sdk.FacerecService.createRecognizer ( final Config  recognizer_config,
final boolean  processing,
final boolean  matching,
final boolean  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 com.vdt.face_recognition.sdk.FacerecService.createService ( final String  dll_path,
final String  facerec_conf_dir,
String  license_dir 
)
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]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 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 com.vdt.face_recognition.sdk.FacerecService.createService ( final String  dll_path,
final String  facerec_conf_dir,
FacerecService.License  license 
)
inlinestatic

Initializes the facerec lib with license content (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]licenseСontent of a license (see pbio::FacerecService::License)
Returns
Created FacerecService object.
VideoWorker com.vdt.face_recognition.sdk.FacerecService.createVideoWorker ( VideoWorker.Params  params)
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]paramsParameters of the VideoWorker constructor.
Returns
Created VideoWorker object.
VideoWorker com.vdt.face_recognition.sdk.FacerecService.createVideoWorker ( final Config  video_worker_config,
final String  recognizer_ini_file,
final int  streams_count,
final int  processing_threads_count,
final int  matching_threads_count 
)
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]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 com.vdt.face_recognition.sdk.FacerecService.createVideoWorker ( final Config  video_worker_config,
final Config  recognizer_config,
final int  streams_count,
final int  processing_threads_count,
final int  matching_threads_count 
)
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]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 com.vdt.face_recognition.sdk.FacerecService.getLicenseState ( )
inline

Get the license state. Thread-safe.

Returns
License state.
String com.vdt.face_recognition.sdk.FacerecService.getVersion ( )
inline

Get version of face recognition library. Thread-safe.

Returns
The version of face recognition library.
boolean com.vdt.face_recognition.sdk.FacerecService.isDisposed ( )
inline

Check if an object is released.

Returns
true if an object is released, false otherwise.
RawSample com.vdt.face_recognition.sdk.FacerecService.loadRawSample ( InputStream  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 com.vdt.face_recognition.sdk.FacerecService.loadRawSampleWithoutImage ( InputStream  binary_stream,
RawImage  image 
)
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 the 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 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.

Returns
Loaded RawSample object.
Parameters
[in]binary_streamInput stream object.
[in]imageImage.
RawSample com.vdt.face_recognition.sdk.FacerecService.loadRawSampleWithoutImage ( InputStream  binary_stream,
RawImage  image,
double  space_translation_x,
double  space_translation_y,
double  space_scale 
)
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 the 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 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.

Returns
Loaded RawSample object.
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.
RawSample com.vdt.face_recognition.sdk.FacerecService.loadRawSampleWithoutImage ( InputStream  binary_stream,
final byte[]  encoded_image_data 
)
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 the 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 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.

Returns
Loaded RawSample object.
Parameters
[in]binary_streamInput stream object.
[in]encoded_image_dataAn array of bytes of the encoded image (or a video frame) with 8 or 24 bits per pixel. Supported formats are JPEG, PNG, TIF, and BMP.
RawSample com.vdt.face_recognition.sdk.FacerecService.loadRawSampleWithoutImage ( InputStream  binary_stream,
final byte[]  encoded_image_data,
double  space_translation_x,
double  space_translation_y,
double  space_scale 
)
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 the 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 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.

Returns
Loaded RawSample object.
Parameters
[in]binary_streamInput stream object.
[in]encoded_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.