3DiVi Face SDK
3.24.2
|
Interface object for creating other interface objects. More...
#include <FacerecService.h>
Classes | |
struct | License |
Storing the license as a string variable. More... | |
struct | LicenseState |
License status. More... | |
Public Types | |
typedef LightSmartPtr < FacerecService >::tPtr | Ptr |
Alias for the type of a smart pointer to FacerecService. | |
Public Member Functions | |
std::string | getVersion () const |
Get version of face recognition library. Thread-safe. More... | |
void | forceOnlineLicenseUpdate () const |
Force online license update. | |
Capturer::Ptr | createCapturer (const pbio::FacerecService::Config config) const |
Creates a Capturer object. Type and features depend on the content of the configuration file. Thread-safe. More... | |
AgeGenderEstimator::Ptr | createAgeGenderEstimator (const std::string ini_file) const |
Creates a AgeGenderEstimator object. Thread-safe. More... | |
QualityEstimator::Ptr | createQualityEstimator (const std::string ini_file) const |
Creates a QualityEstimator object. Thread-safe. More... | |
FaceQualityEstimator::Ptr | createFaceQualityEstimator (const std::string ini_file) const |
Creates a FaceQualityEstimator object. Thread-safe. More... | |
LivenessEstimator::Ptr | createLivenessEstimator () const |
Creates a LivenessEstimator object. Thread-safe. More... | |
EmotionsEstimator::Ptr | createEmotionsEstimator (const std::string ini_file) const |
Creates a EmotionsEstimator object. Thread-safe. More... | |
Recognizer::Ptr | createRecognizer (const char *ini_file, const bool processing=true, const bool matching=true, const bool processing_less_memory_consumption=false) const |
Creates a Recognizer object. Thread-safe. More... | |
Recognizer::Ptr | createRecognizer (const pbio::FacerecService::Config recognizer_config, const bool processing=true, const bool matching=true, const bool processing_less_memory_consumption=false) const |
Creates a Recognizer object. Thread-safe. More... | |
VideoWorker::Ptr | createVideoWorker (const pbio::VideoWorker::Params params) const |
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::Ptr | createVideoWorker (const pbio::FacerecService::Config video_worker_config, const char *recognizer_ini_file, const int streams_count, const int processing_threads_count, const int matching_threads_count) const |
VideoWorker::Ptr | createVideoWorker (const pbio::FacerecService::Config video_worker_config, const pbio::FacerecService::Config recognizer_config, const int streams_count, const int processing_threads_count, const int matching_threads_count) const |
RawSample::Ptr | loadRawSample (std::istream &binary_stream) const |
Loads a RawSample object that was saved with the RawSample::save member function. The format is platform-independent. Thread-safe. More... | |
RawSample::Ptr | loadRawSample (pbio::stl_wraps::WrapIStream &binary_stream) const |
Loads a RawSample object that was saved with the RawSample::save member function. The format is platform-independent. Thread-safe. More... | |
RawSample::Ptr | loadRawSampleWithoutImage (pbio::stl_wraps::WrapIStream &binary_stream, const RawImage image, const double space_translation_x=0, const double space_translation_y=0, const double space_scale=1) const |
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 abour 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::Ptr | loadRawSampleWithoutImage (std::istream &binary_stream, const RawImage image, const double space_translation_x=0, const double space_translation_y=0, const double space_scale=1) const |
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 abour 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::Ptr | loadRawSampleWithoutImage (pbio::stl_wraps::WrapIStream &binary_stream, const unsigned char *image_data, int image_data_size, const double space_translation_x=0, const double space_translation_y=0, const double space_scale=1) const |
RawSample::Ptr | loadRawSampleWithoutImage (std::istream &binary_stream, const unsigned char *image_data, int image_data_size, const double space_translation_x=0, const double space_translation_y=0, const double space_scale=1) const |
CameraCalibrator::Ptr | createCameraCalibrator () const |
Creates a CameraCalibrator object. Thread-safe. More... | |
DepthLivenessEstimator::Ptr | createDepthLivenessEstimator (const std::string ini_file) const |
Creates a DepthLivenessEstimator object. Thread-safe. More... | |
DepthLivenessEstimator::Ptr | createDepthLivenessEstimator (const pbio::FacerecService::Config config) const |
Creates a DepthLivenessEstimator object. Thread-safe. More... | |
IRLivenessEstimator::Ptr | createIRLivenessEstimator (const std::string ini_file) const |
Creates an IRLivenessEstimator object. Thread-safe. More... | |
IRLivenessEstimator::Ptr | createIRLivenessEstimator (const pbio::FacerecService::Config config) const |
Creates an IRLivenessEstimator object. Thread-safe. More... | |
Liveness2DEstimator::Ptr | createLiveness2DEstimator (const std::string ini_file) const |
Creates an Liveness2DEstimator object. Thread-safe. More... | |
Liveness2DEstimator::Ptr | createLiveness2DEstimator (const pbio::FacerecService::Config config) const |
Creates an Liveness2DEstimator object. Thread-safe. More... | |
FaceAttributesEstimator::Ptr | createFaceAttributesEstimator (const std::string ini_file) const |
Creates an FaceAttributesEstimator object. Thread-safe. More... | |
LicenseState | getLicenseState () const |
Get the license state. Thread-safe. More... | |
void | keepAlgorithmsCache () const |
Enalbe keeping algorithms data in memory even if no owners left. This will speedup repeated algorithms initialization. Thread-safe. | |
void | freeAlgorithmsCache () const |
Disable keeping algorithms data in memory. Thread-safe. | |
InternalImageBuffer::Ptr | createInternalImageBuffer (const int width, const int height, const RawImage::Format format) |
Create InternalImageBuffer for specified image size and format. Thread-safe. Always create new InternalImageBuffer for every image or video frame. Never change image data of InternalImageBuffer after first use. More... | |
void | convertYUV2ARGB (const RawImage image, const bool downscale_x2, void *const result_buffer) |
Convert input image to android.graphics.Bitmap.Config.ARGB_8888 format. Input must be in YUV_NV21 of YUV_NV12 format. Note: actual bytes order is BGRA, it looks like ARGB_8888 name use little-endian 32-bit integer notation. Thread-safe. More... | |
Static Public Member Functions | |
static FacerecService::Ptr | createService (const std::string dll_path, std::string facerec_conf_dir, const std::string license_dir=std::string()) |
Initializes the facerec lib (can be called only once). More... | |
static FacerecService::Ptr | createService (const std::string dll_path, std::string facerec_conf_dir, const pbio::FacerecService::License license) |
Initializes the facerec lib with license content (can be called only once). More... | |
Interface object for creating other interface objects.
|
inline |
Convert input image to android.graphics.Bitmap.Config.ARGB_8888 format. Input must be in YUV_NV21 of YUV_NV12 format. Note: actual bytes order is BGRA, it looks like ARGB_8888 name use little-endian 32-bit integer notation. Thread-safe.
[in] | image | Image in YUV_NV21 or YUV_NV12 format. |
[in] | downscale_x2 | Downscale image during conversion, so the result image size will be image.width/2 x image.height/2. |
[out] | result_buffer | Data buffer to store converted result, with size image.width * image.height bytes if downscale_x2, or 4 * image.width * image.height bytes otherwise. |
|
inline |
Creates a AgeGenderEstimator object. Thread-safe.
[in] | ini_file | Name of the config file. |
|
inline |
Creates a CameraCalibrator object. Thread-safe.
|
inline |
|
inline |
Creates a DepthLivenessEstimator object. Thread-safe.
[in] | ini_file | Name of the configuration file. |
|
inline |
Creates a DepthLivenessEstimator object. Thread-safe.
[in] | config | Сonfiguration file with optionally overridden parameters. |
|
inline |
Creates a EmotionsEstimator object. Thread-safe.
[in] | ini_file | Name of the config file. |
|
inline |
Creates an FaceAttributesEstimator object. Thread-safe.
[in] | ini_file | Name of the configuration file. |
|
inline |
Creates a FaceQualityEstimator object. Thread-safe.
[in] | ini_file | Name of the config file. |
|
inline |
Create InternalImageBuffer for specified image size and format. Thread-safe. Always create new InternalImageBuffer for every image or video frame. Never change image data of InternalImageBuffer after first use.
[in] | width | Image width. |
[in] | height | Image height. |
[in] | format | Image format. |
|
inline |
Creates an IRLivenessEstimator object. Thread-safe.
[in] | ini_file | Name of the configuration file. |
|
inline |
Creates an IRLivenessEstimator object. Thread-safe.
[in] | config | Сonfiguration file with optionally overridden parameters. |
|
inline |
Creates an Liveness2DEstimator object. Thread-safe.
[in] | ini_file | Name of the configuration file. |
|
inline |
Creates an Liveness2DEstimator object. Thread-safe.
[in] | config | Сonfiguration file with optionally overridden parameters. |
|
inline |
Creates a LivenessEstimator object. Thread-safe.
|
inline |
Creates a QualityEstimator object. Thread-safe.
[in] | ini_file | Name of the config file. |
|
inline |
Creates a Recognizer object. Thread-safe.
[in] | ini_file | Name of the config file. |
[in] | processing | Flag to toggle the Recognizer::processing method in the created recognizer. |
[in] | matching | Flag to toggle the Recognizer::verifyMatch method in the created recognizer. |
[in] | processing_less_memory_consumption | Flag to toggle the Recognizer::processing member function optimizations that consume a lot of RAM when creating the recognizer (see the docs). |
|
inline |
Creates a Recognizer object. Thread-safe.
[in] | recognizer_config | The Recognizer configuration file with optionally overridden parameters. |
[in] | processing | Flag to toggle the Recognizer::processing method in the created recognizer. |
[in] | matching | Flag to toggle the Recognizer::verifyMatch method in the created recognizer. |
[in] | processing_less_memory_consumption | Flag to toggle the Recognizer::processing member function optimizations that consume a lot of RAM when creating the recognizer (see the docs). |
|
inlinestatic |
Initializes the facerec lib (can be called only once).
[in] | dll_path | An absolute or a relative path to libfacerec.so on Linux or facerec.dll on Windows. |
[in] | facerec_conf_dir | An absolute or a relative path to the directory with config files (the 'face_sdk/conf/facerec/' directory). |
[in] | license_dir | If 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. |
|
inlinestatic |
Initializes the facerec lib with license content (can be called only once).
[in] | dll_path | An absolute or a relative path to libfacerec.so on Linux or facerec.dll on Windows. |
[in] | facerec_conf_dir | An 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) |
|
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).
[in] | params | Parameters of the VideoWorker constructor. |
|
inline |
[in] | video_worker_config | The VideoWorker configuration file with optionally overridden parameters. |
[in] | recognizer_ini_file | Name of the config file for the Recognizer that will be used inside the VideoWorker. |
[in] | streams_count | Number of video streams. |
[in] | processing_threads_count | Number of threads for creating templates. |
[in] | matching_threads_count | Number of threads for matching templates with the database. |
|
inline |
[in] | video_worker_config | The VideoWorker configuration file with optionally overridden parameters. |
[in] | recognizer_config | The Recognizer configuration file with optionally overridden parameters. |
[in] | streams_count | Number of video streams. |
[in] | processing_threads_count | Number of threads for creating templates. |
[in] | matching_threads_count | Number of threads for matching templates with the database. |
|
inline |
Get the license state. Thread-safe.
|
inline |
Get version of face recognition library. Thread-safe.
|
inline |
Loads a RawSample object that was saved with the RawSample::save member function. The format is platform-independent. Thread-safe.
[in] | binary_stream | Input stream object. The file stream (std::ifstream) must be opened with the set flag std::ios_base::binary. |
|
inline |
Loads a RawSample object that was saved with the RawSample::save member function. The format is platform-independent. Thread-safe.
[in] | binary_stream | Input stream object. The file stream (std::ifstream) must be opened with the set flag std::ios_base::binary. |
|
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 abour 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.
[in] | binary_stream | Input stream object. The file stream (std::ifstream) must be opened with the set flag std::ios_base::binary. |
[in] | image | Image. |
[in] | space_translation_x | Coordinate space transform parameter. |
[in] | space_translation_y | Coordinate space transform parameter. |
[in] | space_scale | Coordinate space transform parameter. |
|
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 abour 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.
[in] | binary_stream | Input stream object. The file stream (std::ifstream) must be opened with the set flag std::ios_base::binary. |
[in] | image | Image. |
[in] | space_translation_x | Coordinate space transform parameter. |
[in] | space_translation_y | Coordinate space transform parameter. |
[in] | space_scale | Coordinate space transform parameter. |
|
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 abour 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.
[in] | binary_stream | Input stream object. The file stream (std::ifstream) must be opened with the set flag std::ios_base::binary. |
[in] | image_data | Pointer to the encoded image with 8 or 24 bits per pixel. Supported formats are JPEG, PNG, TIF and BMP. |
[in] | image_data_size | Image data buffer size in bytes |
[in] | space_translation_x | Coordinate space transform parameter. |
[in] | space_translation_y | Coordinate space transform parameter. |
[in] | space_scale | Coordinate space transform parameter. |
|
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 abour 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.
[in] | binary_stream | Input stream object. The file stream (std::ifstream) must be opened with the set flag std::ios_base::binary. |
[in] | image_data | Pointer to the encoded image with 8 or 24 bits per pixel. Supported formats are JPEG, PNG, TIF and BMP. |
[in] | image_data_size | Image data buffer size in bytes |
[in] | space_translation_x | Coordinate space transform parameter. |
[in] | space_translation_y | Coordinate space transform parameter. |
[in] | space_scale | Coordinate space transform parameter. |