3DiVi Face SDK  3.22.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups
FacerecService.h
Go to the documentation of this file.
1 
9 #ifndef __PBIO_API__PBIO__FACEREC_SERVICE_H_
10 #define __PBIO_API__PBIO__FACEREC_SERVICE_H_
11 
12 
13 #include <istream>
14 #include <stdexcept>
15 #include <utility>
16 #include <vector>
17 #include <facerec/libfacerec.h>
18 
19 #ifdef ANDROID
20 #include <jni.h>
21 #endif
22 
23 #include "stl_wraps_impls/WrapIStreamImpl.h"
24 #include "stl_wraps_impls/WrapOStreamImpl.h"
25 
26 
27 #include "AgeGenderEstimator.h"
28 #include "CameraCalibrator.h"
29 #include "Capturer.h"
30 #include "ComplexObject.h"
31 #include "DepthLivenessEstimator.h"
32 #include "IRLivenessEstimator.h"
33 #include "ActiveLiveness.h"
34 #include "Liveness2DEstimator.h"
36 #include "EmotionsEstimator.h"
37 #include "Error.h"
38 #include "ExceptionCheck.h"
39 #include "FaceQualityEstimator.h"
40 #include "LivenessEstimator.h"
41 #include "QualityEstimator.h"
42 #include "RawSample.h"
43 #include "Recognizer.h"
44 #include "SmartPtr.h"
45 #include "Template.h"
46 #include "VideoWorker.h"
47 #include "StructStorage.h"
48 #include "Config.h"
49 #include "ProcessingUnit.h"
50 
51 #ifndef WITHOUT_PROCESSING_BLOCK
52 #include "Context.h"
53 #include "ProcessingBlock.h"
54 #endif
55 
56 namespace pbio
57 {
58 
64 class FacerecService : ComplexObject
65 {
66 public:
67 
73  typedef LightSmartPtr<FacerecService>::tPtr Ptr;
74 
75  typedef pbio::Config Config;
76 
81  struct License
82  {
87  const std::string license_body;
88 
89  License(std::string license_body) : license_body(license_body) { }
90  };
91 
97  struct LicenseState
98  {
104  {
109  std::string name;
110 
115  int64_t max_value;
116 
121  int64_t value;
122  };
123 
128  bool online;
129 
130 
135  std::string android_app_id;
136 
141  std::string android_serial;
142 
147  std::string ios_app_id;
148 
153  std::string hardware_reg;
154 
159  std::vector<CounterState> counters;
160  };
161 
200  const std::string dll_path,
201  std::string facerec_conf_dir,
202  const std::string license_dir = std::string());
203 
238  const std::string dll_path,
239  std::string facerec_conf_dir,
240  const pbio::FacerecService::License license);
241 
243 
244  // internal usage only
246  void* const ae_ptr,
247  const std::string dll_path,
248  std::string facerec_conf_dir,
249  const std::string license,
250  const bool is_license_dir);
251 
253 
254 
272  std::string getVersion() const;
273 
283  void forceOnlineLicenseUpdate() const;
284 
311 
335  AgeGenderEstimator::Ptr createAgeGenderEstimator(const std::string ini_file) const;
336 
360  QualityEstimator::Ptr createQualityEstimator(const std::string ini_file) const;
361 
385  FaceQualityEstimator::Ptr createFaceQualityEstimator(const std::string ini_file) const;
386 
405 
429  EmotionsEstimator::Ptr createEmotionsEstimator(const std::string ini_file) const;
430 
475  const char* ini_file,
476  const bool processing = true,
477  const bool matching = true,
478  const bool processing_less_memory_consumption = false) const;
479 
480 
525  const pbio::FacerecService::Config recognizer_config,
526  const bool processing = true,
527  const bool matching = true,
528  const bool processing_less_memory_consumption = false) const;
529 
562  const pbio::VideoWorker::Params params) const;
563 
564 
607  const pbio::FacerecService::Config video_worker_config,
608  const char* recognizer_ini_file,
609  const int streams_count,
610  const int processing_threads_count,
611  const int matching_threads_count) const;
612 
613 
656  const pbio::FacerecService::Config video_worker_config,
657  const pbio::FacerecService::Config recognizer_config,
658  const int streams_count,
659  const int processing_threads_count,
660  const int matching_threads_count) const;
661 
662 
663 
691  RawSample::Ptr loadRawSample(std::istream &binary_stream) const;
692 
720  RawSample::Ptr loadRawSample(pbio::stl_wraps::WrapIStream &binary_stream) const;
721 
722 
786  pbio::stl_wraps::WrapIStream &binary_stream,
787  const RawImage image,
788  const double space_translation_x = 0,
789  const double space_translation_y = 0,
790  const double space_scale = 1) const;
791 
796  std::istream &binary_stream,
797  const RawImage image,
798  const double space_translation_x = 0,
799  const double space_translation_y = 0,
800  const double space_scale = 1) const;
801 
856  pbio::stl_wraps::WrapIStream &binary_stream,
857  const unsigned char *image_data,
858  int image_data_size,
859  const double space_translation_x = 0,
860  const double space_translation_y = 0,
861  const double space_scale = 1) const;
862 
868  std::istream &binary_stream,
869  const unsigned char *image_data,
870  int image_data_size,
871  const double space_translation_x = 0,
872  const double space_translation_y = 0,
873  const double space_scale = 1) const;
874 
875 
894 
895 
920  const std::string ini_file) const;
921 
922 
947  const pbio::FacerecService::Config config) const;
948 
949 
974  const std::string ini_file) const;
975 
976 
1001  const pbio::FacerecService::Config config) const;
1002 
1003 
1028  const std::string ini_file) const;
1029 
1030 
1055  const pbio::FacerecService::Config config) const;
1056 
1081  const std::string ini_file) const;
1082 
1084 
1085  ProcessingUnit::Ptr createProcessingUnit(
1086  const int block_type,
1087  const char* serializedConfig) const;
1088 
1089 #ifndef WITHOUT_PROCESSING_BLOCK
1090  Context createContext() const;
1091 
1092  Context createContextFromEncodedImage(const uint8_t* data, uint64_t dataSize) const;
1093 
1094  Context createContextFromEncodedImage(const std::vector<uint8_t>& data) const;
1095 
1096  Context createContextFromEncodedImage(const std::string& data) const;
1097 
1098  Context createContextFromEncodedImage(const std::vector<char>& data) const;
1099 
1100  Context createContextFromFrame(uint8_t* data, int32_t width, int32_t height, Context::Format format = Context::Format::FORMAT_BGR, int32_t baseAngle = 0) const;
1101 
1102  ProcessingBlock createProcessingBlock(const Context& config) const;
1103 #endif
1104 
1106 
1124  LicenseState getLicenseState() const;
1125 
1126 
1140  void keepAlgorithmsCache() const;
1141 
1153  void freeAlgorithmsCache() const;
1154 
1155 
1196  const int width,
1197  const int height,
1198  const RawImage::Format format);
1199 
1200 
1201 #ifdef ANDROID
1202 
1242  JNIEnv *env,
1243  jobject android_media_image);
1244 #endif // ifdef ANDROID
1245 
1246 
1287  void convertYUV2ARGB(
1288  const RawImage image,
1289  const bool downscale_x2,
1290  void* const result_buffer);
1291 
1292 
1293  void convertYUV2RGB(
1294  const RawImage image,
1295  const bool downscale_x2,
1296  const int base_angle,
1297  void* const result_buffer);
1298 
1299 
1300  void convertBGRA88882RGB(
1301  const RawImage image,
1302  const bool downscale_x2,
1303  const int base_angle,
1304  void* const result_buffer);
1305 
1306 
1307 private:
1308 
1309  const std::string _facerec_conf_dir;
1310 
1311  friend class object_with_ref_counter<FacerecService>;
1312 protected:
1314  const DHPtr &dll_handle,
1315  const std::string &facerec_conf_dir,
1316  void* impl);
1317 };
1318 
1319 } // pbio namespace
1320 
1321 
1322 
1323 
1327 
1328 
1329 namespace pbio
1330 {
1331 
1332 
1333 // static
1334 inline
1336  const std::string dll_path,
1337  std::string facerec_conf_dir,
1338  const std::string license_dir)
1339 {
1340  return createService(NULL, dll_path, facerec_conf_dir, license_dir, true);
1341 }
1342 
1343 // static
1344 inline
1346  const std::string dll_path,
1347  std::string facerec_conf_dir,
1348  const pbio::FacerecService::License license)
1349 {
1350  return createService(NULL, dll_path, facerec_conf_dir, license.license_body, false);
1351 }
1352 
1353 // static
1354 inline
1356  void* const ae_ptr,
1357  const std::string dll_path,
1358  std::string facerec_conf_dir,
1359  const std::string license,
1360  const bool is_license_dir)
1361 {
1362 
1363 #ifdef __STATIC_LIBFACEREC_BUILD__
1364  (void) dll_path;
1365 
1366  const DHPtr dll_handle( DHPtr::make() );
1367 #else
1368  const DHPtr dll_handle( DHPtr::make(dll_path.c_str()) );
1369 #endif
1370 
1371  if(facerec_conf_dir.empty())
1372  {
1373  facerec_conf_dir = "./";
1374  }
1375  else if(facerec_conf_dir[facerec_conf_dir.length() - 1] != '/')
1376  {
1377  facerec_conf_dir += '/';
1378  }
1379 
1380  void* exception = NULL;
1381 
1382  void* the_impl;
1383 
1384  if (is_license_dir)
1385  {
1386  the_impl = dll_handle->FacerecService_constructor3(
1387  ae_ptr,
1388  facerec_conf_dir.c_str(),
1389  license.empty() ?
1390  NULL :
1391  license.c_str(),
1392  dll_path.c_str(),
1393  &exception);
1394  }else
1395  {
1396  the_impl = dll_handle->FacerecService_constructor5(
1397  ae_ptr,
1398  facerec_conf_dir.c_str(),
1399  license.c_str(),
1400  dll_path.c_str(),
1401  &exception);
1402  }
1403 
1404  checkException(exception, *dll_handle);
1405 
1406  return FacerecService::Ptr::make(
1407  dll_handle,
1408  facerec_conf_dir,
1409  the_impl);
1410 }
1411 
1412 
1413 inline
1414 FacerecService::FacerecService(
1415  const DHPtr &dll_handle,
1416  const std::string &facerec_conf_dir,
1417  void* impl):
1418 ComplexObject(dll_handle, impl),
1419 _facerec_conf_dir(facerec_conf_dir)
1420 {
1421  std::string lib_version = getVersion();
1422 
1423  if (LIBFACEREC_VERSION != lib_version)
1424  std::cerr << "WARNING: The version in the header does not match the version in the library. Header version: "
1425  << LIBFACEREC_VERSION << ", library version: " << lib_version << std::endl;
1426 }
1427 
1428 
1429 inline
1430 std::string FacerecService::getVersion() const
1431 {
1432  std::ostringstream version_stream;
1433  pbio::stl_wraps::WrapOStreamImpl version_stream_wrap(version_stream);
1434 
1435  void* exception = NULL;
1436 
1437  _dll_handle->get_version(
1438  &version_stream_wrap,
1439  pbio::stl_wraps::WrapOStream::write_func,
1440  &exception);
1441 
1442  checkException(exception, *_dll_handle);
1443 
1444  return version_stream.str();
1445 }
1446 
1447 
1448 inline
1450 {
1451  void* exception = NULL;
1452 
1453  _dll_handle->FacerecService_forceOnlineLicenseUpdate(
1454  _impl,
1455  &exception);
1456 
1457  checkException(exception, *_dll_handle);
1458 }
1459 
1460 inline
1462  const pbio::FacerecService::Config config) const
1463 {
1464  const std::string file_path = _facerec_conf_dir + config.config_filepath;
1465 
1466  std::vector<char const*> overridden_keys;
1467  std::vector<double> overridden_values;
1468 
1469  config.prepare(overridden_keys, overridden_values);
1470 
1471  void* exception = NULL;
1472 
1473  pbio::facerec::CapturerImpl* const capturer_impl =
1474  _dll_handle->FacerecService_createCapturerE(
1475  _impl,
1476  file_path.c_str(),
1477  overridden_keys.size(),
1478  overridden_keys.empty() ? NULL : &(overridden_keys[0]),
1479  overridden_values.empty() ? NULL : &(overridden_values[0]),
1480  &exception);
1481 
1482  checkException(exception, *_dll_handle);
1483 
1484  return Capturer::Ptr::make(_dll_handle, capturer_impl);
1485 }
1486 
1487 inline
1489 {
1490  const std::string file_path = _facerec_conf_dir + ini_file;
1491 
1492  void* exception = NULL;
1493 
1494  pbio::facerec::AgeGenderEstimatorImpl* const the_impl =
1495  _dll_handle->FacerecService_createAgeGenderEstimator(
1496  _impl,
1497  file_path.c_str(),
1498  &exception);
1499 
1500  checkException(exception, *_dll_handle);
1501 
1502  return AgeGenderEstimator::Ptr::make(_dll_handle, the_impl);
1503 }
1504 
1505 
1506 inline
1508 {
1509  const std::string file_path = _facerec_conf_dir + ini_file;
1510 
1511  void* exception = NULL;
1512 
1513  pbio::facerec::QualityEstimatorImpl* const the_impl =
1514  _dll_handle->FacerecService_createQualityEstimator(
1515  _impl,
1516  file_path.c_str(),
1517  &exception);
1518 
1519  checkException(exception, *_dll_handle);
1520 
1521  return QualityEstimator::Ptr::make(_dll_handle, the_impl);
1522 }
1523 
1524 
1525 inline
1527 {
1528  const std::string file_path = _facerec_conf_dir + ini_file;
1529 
1530  void* exception = NULL;
1531 
1532  pbio::facerec::FaceQualityEstimatorImpl* const the_impl =
1533  _dll_handle->FacerecService_createFaceQualityEstimator(
1534  _impl,
1535  file_path.c_str(),
1536  &exception);
1537 
1538  checkException(exception, *_dll_handle);
1539 
1540  return FaceQualityEstimator::Ptr::make(_dll_handle, the_impl);
1541 }
1542 
1543 inline
1545 {
1546  void* exception = NULL;
1547 
1548  pbio::facerec::LivenessEstimatorImpl* const the_impl =
1549  _dll_handle->FacerecService_createLivenessEstimator(
1550  _impl,
1551  &exception);
1552 
1553  checkException(exception, *_dll_handle);
1554 
1555  return LivenessEstimator::Ptr::make(_dll_handle, the_impl);
1556 }
1557 
1558 
1559 inline
1561  const std::string ini_file) const
1562 {
1563  const std::string file_path = _facerec_conf_dir + ini_file;
1564 
1565  void* exception = NULL;
1566 
1567  pbio::facerec::EmotionsEstimatorImpl* const the_impl =
1568  _dll_handle->FacerecService_createEmotionsEstimator(
1569  _impl,
1570  file_path.c_str(),
1571  &exception);
1572 
1573  checkException(exception, *_dll_handle);
1574 
1575  return EmotionsEstimator::Ptr::make(_dll_handle, the_impl);
1576 }
1577 
1578 
1579 inline
1581  const char* ini_file,
1582  const bool processing,
1583  const bool matching,
1584  const bool processing_less_memory_consumption) const
1585 {
1586  const std::string file_path = _facerec_conf_dir + ini_file;
1587 
1588  void* exception = NULL;
1589 
1590  pbio::facerec::RecognizerImpl* const recognizer_impl =
1591  _dll_handle->FacerecService_createRecognizer2(
1592  _impl,
1593  file_path.c_str(),
1594  0,
1595  NULL,
1596  NULL,
1597  (int) processing,
1598  (int) matching,
1599  (int) processing_less_memory_consumption,
1600  &exception);
1601 
1602  checkException(exception, *_dll_handle);
1603 
1604  return Recognizer::Ptr::make(_dll_handle, recognizer_impl);
1605 }
1606 
1607 
1608 inline
1610  const pbio::FacerecService::Config recognizer_config,
1611  const bool processing,
1612  const bool matching,
1613  const bool processing_less_memory_consumption) const
1614 {
1615  const std::string file_path = _facerec_conf_dir + recognizer_config.config_filepath;
1616 
1617  std::vector<char const*> overridden_keys;
1618  std::vector<double> overridden_values;
1619 
1620  recognizer_config.prepare(overridden_keys, overridden_values);
1621 
1622  void* exception = NULL;
1623 
1624  pbio::facerec::RecognizerImpl* const recognizer_impl =
1625  _dll_handle->FacerecService_createRecognizer2(
1626  _impl,
1627  file_path.c_str(),
1628  overridden_keys.size(),
1629  overridden_keys.empty() ? NULL : &(overridden_keys[0]),
1630  overridden_values.empty() ? NULL : &(overridden_values[0]),
1631  (int) processing,
1632  (int) matching,
1633  (int) processing_less_memory_consumption,
1634  &exception);
1635 
1636  checkException(exception, *_dll_handle);
1637 
1638  return Recognizer::Ptr::make(_dll_handle, recognizer_impl);
1639 }
1640 
1641 
1642 
1643 inline
1645  const pbio::FacerecService::Config video_worker_ini_file,
1646  const char* recognizer_ini_file,
1647  const int streams_count,
1648  const int processing_threads_count,
1649  const int matching_threads_count) const
1650 {
1651  return createVideoWorker(
1653  .video_worker_config(video_worker_ini_file)
1654  .recognizer_ini_file(recognizer_ini_file)
1655  .streams_count(streams_count)
1656  .processing_threads_count(processing_threads_count)
1657  .matching_threads_count(matching_threads_count)
1658  );
1659 }
1660 
1661 inline
1663  const pbio::FacerecService::Config video_worker_ini_file,
1664  const pbio::FacerecService::Config recognizer_config,
1665  const int streams_count,
1666  const int processing_threads_count,
1667  const int matching_threads_count) const
1668 {
1669  return createVideoWorker(
1671  .video_worker_config(video_worker_ini_file)
1672  .recognizer_config(recognizer_config)
1673  .streams_count(streams_count)
1674  .processing_threads_count(processing_threads_count)
1675  .matching_threads_count(matching_threads_count)
1676  );
1677 }
1678 
1679 inline
1681  const VideoWorker::Params params) const
1682 {
1683  std::vector<char const*> vw_overridden_keys;
1684  std::vector<double> vw_overridden_values;
1685 
1686  params._video_worker_config.prepare(vw_overridden_keys, vw_overridden_values);
1687  std::vector<std::string> extra_over_params;
1688 
1689  if(!params._active_liveness_checks_order.empty()){
1690  bool is_unique = true;
1691  for (auto it = params._active_liveness_checks_order.begin(); it != params._active_liveness_checks_order.end(); ++it)
1692  if (std::find(it + 1, params._active_liveness_checks_order.end(), *it) != params._active_liveness_checks_order.end()) {
1693  is_unique = false;
1694  break;
1695  }
1696  if(!is_unique)
1697  throw pbio::Error(0x3302330e,
1698  "Error 0x3302330e: Set a unique order of `active_liveness_checks_order` for Active Liveness.");
1699  for (size_t i = 0; i < params._active_liveness_checks_order.size(); i++){
1700  ActiveLiveness::CheckType check = params._active_liveness_checks_order[i];
1701  std::string check_str = ActiveLiveness::CheckTypeToString(check);
1702  extra_over_params.push_back("active_liveness.check_" + check_str);
1703  vw_overridden_keys.push_back(extra_over_params.back().c_str());
1704  vw_overridden_values.push_back(-(double)(i+1));
1705  }
1706  }
1707 
1708 
1709  if (!params._recognizer_ini_file.empty() && !params._recognizer_config.config_filepath.empty())
1710  throw pbio::Error(0xb3fe4d07, "Error: 0xed877a99 You must use either recognizer_config or recognizer_ini_file.");
1711 
1712  pbio::FacerecService::Config recognizer_config =
1713  params._recognizer_ini_file.empty() ?
1714  params._recognizer_config :
1715  pbio::FacerecService::Config(params._recognizer_ini_file);
1716 
1717  std::vector<char const*> rec_overridden_keys;
1718  std::vector<double> rec_overridden_values;
1719 
1720  recognizer_config.prepare(rec_overridden_keys, rec_overridden_values);
1721 
1722  void* exception = NULL;
1723 
1724  pbio::facerec::VideoWorkerImpl* const vw_impl =
1725  _dll_handle->FacerecService_createVideoWorker_sti_age_gender_emotions(
1726  _impl,
1727 
1728  VideoWorker::STrackingCallback,
1729  VideoWorker::STemplateCreatedCallback,
1730  VideoWorker::SMatchFoundCallback,
1731  VideoWorker::STrackingLostCallback,
1732  VideoWorker::SStiPersonOutdatedCallback,
1733 
1734  (_facerec_conf_dir + params._video_worker_config.config_filepath).c_str(),
1735  vw_overridden_keys.size(),
1736  vw_overridden_keys.empty() ? NULL : &(vw_overridden_keys[0]),
1737  vw_overridden_values.empty() ? NULL : &(vw_overridden_values[0]),
1738 
1739  (_facerec_conf_dir + recognizer_config.config_filepath).c_str(),
1740  rec_overridden_keys.size(),
1741  rec_overridden_keys.empty() ? NULL : &(rec_overridden_keys[0]),
1742  rec_overridden_values.empty() ? NULL : &(rec_overridden_values[0]),
1743 
1744  params._streams_count,
1745  params._processing_threads_count,
1746  params._matching_threads_count,
1747  params._short_time_identification_enabled,
1748  params._short_time_identification_distance_threshold,
1749  params._short_time_identification_outdate_time_seconds,
1750  params._age_gender_estimation_threads_count,
1751  params._emotions_estimation_threads_count,
1752  &exception);
1753 
1754  checkException(exception, *_dll_handle);
1755 
1756  return VideoWorker::Ptr::make(_dll_handle, vw_impl);
1757 }
1758 
1759 
1760 inline
1761 RawSample::Ptr FacerecService::loadRawSample(std::istream &binary_stream) const
1762 {
1763  pbio::stl_wraps::WrapIStreamImpl binary_stream_wrap(binary_stream);
1764 
1765  return loadRawSample(binary_stream_wrap);
1766 }
1767 
1768 inline
1769 RawSample::Ptr FacerecService::loadRawSample(pbio::stl_wraps::WrapIStream &binary_stream) const
1770 {
1771  void* exception = NULL;
1772 
1773  pbio::facerec::RawSampleImpl* const raw_sampl_impl =
1774  _dll_handle->FacerecService_loadRawSample(
1775  _impl,
1776  &binary_stream,
1777  pbio::stl_wraps::WrapIStream::read_func,
1778  &exception);
1779 
1780  checkException(exception, *_dll_handle);
1781 
1782  return RawSample::Ptr::make(_dll_handle, raw_sampl_impl);
1783 }
1784 
1785 inline
1787  pbio::stl_wraps::WrapIStream &binary_stream,
1788  const RawImage image,
1789  const double space_translation_x,
1790  const double space_translation_y,
1791  const double space_scale) const
1792 {
1793  void* exception = NULL;
1794 
1795  const RawImage::CapiData cdata = image.makeCapiData();
1796 
1797  pbio::facerec::RawSampleImpl* const raw_sampl_impl =
1798  _dll_handle->FacerecService_loadRawSampleWithoutImage_raw_image(
1799  _impl,
1800  &binary_stream,
1801  pbio::stl_wraps::WrapIStream::read_func,
1802 
1803  cdata.data,
1804  cdata.width,
1805  cdata.height,
1806  cdata.format,
1807  cdata.with_crop,
1808  cdata.crop_info_offset_x,
1809  cdata.crop_info_offset_y,
1810  cdata.crop_info_data_image_width,
1811  cdata.crop_info_data_image_height,
1812 
1813  space_translation_x,
1814  space_translation_y,
1815  space_scale,
1816 
1817  &exception);
1818 
1819  checkException(exception, *_dll_handle);
1820 
1821  return RawSample::Ptr::make(_dll_handle, raw_sampl_impl);
1822 }
1823 
1824 inline
1826  std::istream &binary_stream,
1827  const RawImage image,
1828  const double space_translation_x,
1829  const double space_translation_y,
1830  const double space_scale) const
1831 {
1832  pbio::stl_wraps::WrapIStreamImpl binary_stream_wrap(binary_stream);
1833 
1835  binary_stream_wrap,
1836  image,
1837  space_translation_x,
1838  space_translation_y,
1839  space_scale);
1840 }
1841 
1842 inline
1844  pbio::stl_wraps::WrapIStream &binary_stream,
1845  const unsigned char *image_data,
1846  int image_data_size,
1847  const double space_translation_x,
1848  const double space_translation_y,
1849  const double space_scale) const
1850 {
1851  void* exception = NULL;
1852 
1853  pbio::facerec::RawSampleImpl* const raw_sampl_impl =
1854  _dll_handle->FacerecService_loadRawSampleWithoutImage_encoded_image(
1855  _impl,
1856  &binary_stream,
1857  pbio::stl_wraps::WrapIStream::read_func,
1858 
1859  image_data,
1860  image_data_size,
1861 
1862  space_translation_x,
1863  space_translation_y,
1864  space_scale,
1865 
1866  &exception);
1867 
1868  checkException(exception, *_dll_handle);
1869 
1870  return RawSample::Ptr::make(_dll_handle, raw_sampl_impl);
1871 }
1872 
1873 inline
1875  std::istream &binary_stream,
1876  const unsigned char *image_data,
1877  int image_data_size,
1878  const double space_translation_x,
1879  const double space_translation_y,
1880  const double space_scale) const
1881 {
1882  pbio::stl_wraps::WrapIStreamImpl binary_stream_wrap(binary_stream);
1883 
1884 
1886  binary_stream_wrap,
1887  image_data,
1888  image_data_size,
1889  space_translation_x,
1890  space_translation_y,
1891  space_scale);
1892 }
1893 
1894 
1895 inline
1897 {
1898  void* exception = NULL;
1899 
1900  pbio::facerec::CameraCalibratorImpl* const calibrator_impl =
1901  _dll_handle->FacerecService_createCameraCalibrator(
1902  _impl,
1903  &exception);
1904 
1905  checkException(exception, *_dll_handle);
1906 
1907  return CameraCalibrator::Ptr::make(_dll_handle, calibrator_impl);
1908 }
1909 
1910 
1911 
1912 inline
1914  const std::string ini_file) const
1915 {
1916  const std::string file_path = _facerec_conf_dir + ini_file;
1917 
1918  void* exception = NULL;
1919 
1920  pbio::facerec::DepthLivenessEstimatorImpl* const the_impl =
1921  _dll_handle->FacerecService_createDepthLivenessEstimatorE(
1922  _impl,
1923  file_path.c_str(),
1924  0, // overridden keys size
1925  NULL, // overridden keys
1926  NULL, // overriden values
1927  &exception);
1928 
1929  checkException(exception, *_dll_handle);
1930 
1931  return DepthLivenessEstimator::Ptr::make(_dll_handle, the_impl);
1932 }
1933 
1934 
1935 inline
1937  const pbio::FacerecService::Config config) const
1938 {
1939  const std::string file_path = _facerec_conf_dir + config.config_filepath;
1940 
1941  std::vector<char const*> overridden_keys;
1942  std::vector<double> overridden_values;
1943 
1944  config.prepare(overridden_keys, overridden_values);
1945 
1946  void* exception = NULL;
1947 
1948  pbio::facerec::DepthLivenessEstimatorImpl* const the_impl =
1949  _dll_handle->FacerecService_createDepthLivenessEstimatorE(
1950  _impl,
1951  file_path.c_str(),
1952  overridden_keys.size(),
1953  overridden_keys.empty() ? NULL : &(overridden_keys[0]),
1954  overridden_values.empty() ? NULL : &(overridden_values[0]),
1955  &exception);
1956 
1957  checkException(exception, *_dll_handle);
1958 
1959  return DepthLivenessEstimator::Ptr::make(_dll_handle, the_impl);
1960 }
1961 
1962 inline
1964  const std::string ini_file) const
1965 {
1966  const std::string file_path = _facerec_conf_dir + ini_file;
1967 
1968  void* exception = NULL;
1969 
1970  pbio::facerec::IRLivenessEstimatorImpl* const the_impl =
1971  _dll_handle->FacerecService_createIRLivenessEstimatorE(
1972  _impl,
1973  file_path.c_str(),
1974  0, // overridden keys size
1975  NULL, // overridden keys
1976  NULL, // overriden values
1977  &exception);
1978 
1979  checkException(exception, *_dll_handle);
1980 
1981  return IRLivenessEstimator::Ptr::make(_dll_handle, the_impl);
1982 }
1983 
1984 inline
1986  const pbio::FacerecService::Config config) const
1987 {
1988  const std::string file_path = _facerec_conf_dir + config.config_filepath;
1989 
1990  std::vector<char const*> overridden_keys;
1991  std::vector<double> overridden_values;
1992 
1993  config.prepare(overridden_keys, overridden_values);
1994 
1995  void* exception = NULL;
1996 
1997  pbio::facerec::IRLivenessEstimatorImpl* const the_impl =
1998  _dll_handle->FacerecService_createIRLivenessEstimatorE(
1999  _impl,
2000  file_path.c_str(),
2001  overridden_keys.size(),
2002  overridden_keys.empty() ? NULL : &(overridden_keys[0]),
2003  overridden_values.empty() ? NULL : &(overridden_values[0]),
2004  &exception);
2005 
2006  checkException(exception, *_dll_handle);
2007 
2008  return IRLivenessEstimator::Ptr::make(_dll_handle, the_impl);
2009 }
2010 
2011 inline
2013  const std::string ini_file) const
2014 {
2015  const std::string file_path = _facerec_conf_dir + ini_file;
2016 
2017  void* exception = NULL;
2018 
2019  pbio::facerec::Liveness2DEstimatorImpl* const the_impl =
2020  _dll_handle->FacerecService_createLiveness2DEstimatorE(
2021  _impl,
2022  file_path.c_str(),
2023  0, // overridden keys size
2024  NULL, // overridden keys
2025  NULL, // overriden values
2026  &exception);
2027 
2028  checkException(exception, *_dll_handle);
2029 
2030  return Liveness2DEstimator::Ptr::make(_dll_handle, the_impl);
2031 }
2032 
2033 inline
2035  const pbio::FacerecService::Config config) const
2036 {
2037  const std::string file_path = _facerec_conf_dir + config.config_filepath;
2038 
2039  std::vector<char const*> overridden_keys;
2040  std::vector<double> overridden_values;
2041 
2042  config.prepare(overridden_keys, overridden_values);
2043 
2044  void* exception = NULL;
2045 
2046  pbio::facerec::Liveness2DEstimatorImpl* const the_impl =
2047  _dll_handle->FacerecService_createLiveness2DEstimatorE(
2048  _impl,
2049  file_path.c_str(),
2050  overridden_keys.size(),
2051  overridden_keys.empty() ? NULL : &(overridden_keys[0]),
2052  overridden_values.empty() ? NULL : &(overridden_values[0]),
2053  &exception);
2054 
2055  checkException(exception, *_dll_handle);
2056 
2057  return Liveness2DEstimator::Ptr::make(_dll_handle, the_impl);
2058 }
2059 
2060 inline
2062  const std::string ini_file) const
2063 {
2064  const std::string file_path = _facerec_conf_dir + ini_file;
2065 
2066  void* exception = NULL;
2067 
2068  pbio::facerec::FaceAttributesEstimatorImpl* const the_impl =
2069  _dll_handle->FacerecService_createFaceAttributesEstimator(
2070  _impl,
2071  file_path.c_str(),
2072  0, // overridden keys size
2073  NULL, // overridden keys
2074  NULL, // overriden values
2075  &exception);
2076 
2077  checkException(exception, *_dll_handle);
2078 
2079  return FaceAttributesEstimator::Ptr::make(_dll_handle, the_impl);
2080 }
2081 
2083 
2084 inline
2085 ProcessingUnit::Ptr FacerecService::createProcessingUnit(
2086  const int block_type,
2087  const char* serializedConfig) const
2088 {
2089  return ProcessingUnit::Ptr::make(_dll_handle, block_type, serializedConfig);
2090 }
2091 
2092 #ifndef WITHOUT_PROCESSING_BLOCK
2093 inline Context FacerecService::createContext() const
2094 {
2095  return Context(_dll_handle);
2096 }
2097 
2098 inline Context FacerecService::createContextFromEncodedImage(const uint8_t* data, uint64_t dataSize) const
2099 {
2100  return Context(_dll_handle, data, dataSize);
2101 }
2102 
2103 inline Context FacerecService::createContextFromEncodedImage(const std::vector<uint8_t>& data) const
2104 {
2105  return Context(_dll_handle, data.data(), data.size());
2106 }
2107 
2108 inline Context FacerecService::createContextFromEncodedImage(const std::string& data) const
2109 {
2110  return Context(_dll_handle, reinterpret_cast<const uint8_t*>(data.data()), data.size());
2111 }
2112 
2113 inline Context FacerecService::createContextFromEncodedImage(const std::vector<char>& data) const
2114 {
2115  return Context(_dll_handle, reinterpret_cast<const uint8_t*>(data.data()), data.size());
2116 }
2117 
2118 inline Context FacerecService::createContextFromFrame(uint8_t* data, int32_t width, int32_t height, Context::Format format, int32_t baseAngle) const
2119 {
2120  return Context(_dll_handle, data, width, height, format, baseAngle);
2121 }
2122 
2123 inline ProcessingBlock FacerecService::createProcessingBlock(const Context& config) const
2124 {
2125  return ProcessingBlock(_impl, _dll_handle, config);
2126 }
2127 #endif
2128 
2130 
2131 inline
2133 {
2134  void* exception = NULL;
2135 
2136  void* struct_storage_impl = _dll_handle->FacerecService_getLicenseState(_impl, &exception);
2137 
2138  checkException(exception, *_dll_handle);
2139 
2140  const StructStorage struct_storage(_dll_handle, struct_storage_impl);
2141 
2142  LicenseState result;
2143 
2144  result.online = struct_storage.get_int64(StructStorageFields::license_state_online_t);
2145 
2146  result.android_app_id = (char const*) struct_storage.get_pointer(StructStorageFields::license_state_android_app_id_t);
2147  result.android_serial = (char const*) struct_storage.get_pointer(StructStorageFields::license_state_android_serial_t);
2148  result.ios_app_id = (char const*) struct_storage.get_pointer(StructStorageFields::license_state_ios_app_id_t);
2149  result.hardware_reg = (char const*) struct_storage.get_pointer(StructStorageFields::license_state_hardware_reg_t);
2150 
2151  result.counters.resize( struct_storage.get_int64(
2152  StructStorageFields::license_state_licenses_count_t) );
2153 
2154  for(size_t i = 0; i < result.counters.size(); ++i)
2155  {
2156  result.counters[i].name = (char const*) struct_storage.get_pointer(
2157  (i << 16) | size_t(StructStorageFields::license_state_licenses_names_int16_t) );
2158 
2159  result.counters[i].max_value = struct_storage.get_int64(
2160  (i << 16) | size_t(StructStorageFields::license_state_licenses_total_counts_int16_t) );
2161 
2162  result.counters[i].value = struct_storage.get_int64(
2163  (i << 16) | size_t(StructStorageFields::license_state_licenses_in_use_counts_int16_t) );
2164  }
2165 
2166  return result;
2167 }
2168 
2169 
2170 inline
2172 {
2173  void* exception = NULL;
2174 
2175  _dll_handle->FacerecService_toggleAlgorithmsCacheKepp(1, &exception);
2176 
2177  checkException(exception, *_dll_handle);
2178 }
2179 
2180 inline
2182 {
2183  void* exception = NULL;
2184 
2185  _dll_handle->FacerecService_toggleAlgorithmsCacheKepp(0, &exception);
2186 
2187  checkException(exception, *_dll_handle);
2188 }
2189 
2190 
2191 
2192 inline
2194  const int width,
2195  const int height,
2196  const RawImage::Format format)
2197 {
2198  void* exception = NULL;
2199 
2200  int32_t data_size;
2201  void* data_ptr;
2202  void* imagetptr_ptr;
2203 
2204  void* const the_impl = _dll_handle->InternalImageBuffer_constructor(
2205  width,
2206  height,
2207  format,
2208  &data_size,
2209  &data_ptr,
2210  &imagetptr_ptr,
2211  &exception);
2212 
2213  checkException(exception, *_dll_handle);
2214 
2215  return InternalImageBuffer::Ptr::make(
2216  _dll_handle,
2217  the_impl,
2218  (unsigned char*) data_ptr,
2219  data_size,
2220  width,
2221  height,
2222  format,
2223  imagetptr_ptr);
2224 }
2225 
2226 
2227 #ifdef ANDROID
2228 inline
2230  JNIEnv *env,
2231  jobject android_media_image)
2232 {
2233  void* exception = NULL;
2234 
2235  int32_t width;
2236  int32_t height;
2237  int32_t format;
2238  int32_t data_size;
2239  void* data_ptr;
2240  void* imagetptr_ptr;
2241 
2242  void* const the_impl = _dll_handle->InternalImageBuffer_constructor_from_android_image(
2243  env,
2244  android_media_image,
2245  &width,
2246  &height,
2247  &format,
2248  &data_size,
2249  &data_ptr,
2250  &imagetptr_ptr,
2251  &exception);
2252 
2253  checkException(exception, *_dll_handle);
2254 
2255  return InternalImageBuffer::Ptr::make(
2256  _dll_handle,
2257  the_impl,
2258  (unsigned char*) data_ptr,
2259  data_size,
2260  width,
2261  height,
2262  (InternalImageBuffer::Format) format,
2263  imagetptr_ptr);
2264 }
2265 #endif
2266 
2267 inline
2269  const RawImage image,
2270  const bool downscale_x2,
2271  void* const result_buffer)
2272 {
2273  void* exception = NULL;
2274 
2275  const RawImage::CapiData cdata = image.makeCapiData();
2276 
2277  _dll_handle->RawImage_convertYUV2ARGB(
2278  cdata.data,
2279  cdata.width,
2280  cdata.height,
2281  cdata.format,
2282  cdata.with_crop,
2283  cdata.crop_info_offset_x,
2284  cdata.crop_info_offset_y,
2285  cdata.crop_info_data_image_width,
2286  cdata.crop_info_data_image_height,
2287  downscale_x2,
2288  result_buffer,
2289  &exception);
2290 
2291  checkException(exception, *_dll_handle);
2292 }
2293 
2294 inline
2295 void FacerecService::convertYUV2RGB(
2296  const RawImage image,
2297  const bool downscale_x2,
2298  const int base_angle,
2299  void* const result_buffer)
2300 {
2301  void* exception = NULL;
2302 
2303  const RawImage::CapiData cdata = image.makeCapiData();
2304 
2305  _dll_handle->RawImage_convertYUV2RGB(
2306  cdata.data,
2307  cdata.width,
2308  cdata.height,
2309  cdata.format,
2310  cdata.with_crop,
2311  cdata.crop_info_offset_x,
2312  cdata.crop_info_offset_y,
2313  cdata.crop_info_data_image_width,
2314  cdata.crop_info_data_image_height,
2315  downscale_x2,
2316  base_angle,
2317  result_buffer,
2318  &exception);
2319 
2320  checkException(exception, *_dll_handle);
2321 }
2322 
2323 inline
2324 void FacerecService::convertBGRA88882RGB(
2325  const RawImage image,
2326  const bool downscale_x2,
2327  const int base_angle,
2328  void* const result_buffer)
2329 {
2330  void* exception = NULL;
2331 
2332  const RawImage::CapiData cdata = image.makeCapiData();
2333 
2334  _dll_handle->RawImage_convertYUV2RGB(
2335  cdata.data,
2336  cdata.width,
2337  cdata.height,
2338  cdata.format,
2339  cdata.with_crop,
2340  cdata.crop_info_offset_x,
2341  cdata.crop_info_offset_y,
2342  cdata.crop_info_data_image_width,
2343  cdata.crop_info_data_image_height,
2344  downscale_x2,
2345  base_angle,
2346  result_buffer,
2347  &exception);
2348 
2349  checkException(exception, *_dll_handle);
2350 }
2351 
2352 
2353 } // pbio namespace
2354 
2355 
2356 
2357 
2358 
2359 #endif // __PBIO_API__PBIO__FACEREC_SERVICE_H_
Interface object used to work with estimators from Processing Block API.
Definition: ProcessingBlock.h:29
std::string android_serial
Serial number of the Android device. Only available on Android (tag <android_serial>).
Definition: FacerecService.h:141
void keepAlgorithmsCache() const
Enalbe keeping algorithms data in memory even if no owners left. This will speedup repeated algorithm...
Definition: FacerecService.h:2171
Struct that provides raw image data and optional cropping information.
Definition: RawImage.h:28
Interface object for creating other interface objects.
Definition: FacerecService.h:64
ProcessingBlock - Interface object used to work with estimators from Processing Block API...
QualityEstimator - Interface object used to estimate sample quality.
VideoWorker is an interface object for tracking, processing and matching faces on multiple video stre...
LightSmartPtr< InternalImageBuffer >::tPtr Ptr
Alias for the type of a smart pointer to InternalImageBuffer.
Definition: InternalImageBuffer.h:34
CameraCalibrator - Interface object for camera calibration and correction of image distortion...
RawSample::Ptr loadRawSample(std::istream &binary_stream) const
Loads a RawSample object that was saved with the RawSample::save member function. The format is platf...
Definition: FacerecService.h:1761
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).
Definition: FacerecService.h:1335
LightSmartPtr< EmotionsEstimator >::tPtr Ptr
Alias for the type of a smart pointer to EmotionsEstimator.
Definition: EmotionsEstimator.h:50
Recognizer - Interface object for creating and matching templates.
int64_t max_value
Maximum counter value (equals to the tag value).
Definition: FacerecService.h:115
State of the counter assigned to a specified license element.
Definition: FacerecService.h:103
std::string android_app_id
Android application ID. Available only on Android (tag <android_app_id>).
Definition: FacerecService.h:135
LightSmartPtr< IRLivenessEstimator >::tPtr Ptr
Alias for the type of a smart pointer to IRLivenessEstimator.
Definition: IRLivenessEstimator.h:43
LightSmartPtr< FaceQualityEstimator >::tPtr Ptr
Alias for the type of a smart pointer to FaceQualityEstimator.
Definition: FaceQualityEstimator.h:50
LightSmartPtr< VideoWorker >::tPtr Ptr
Alias for the type of a smart pointer to VideoWorker.
Definition: VideoWorker.h:72
Liveness2DEstimator is an interface object used to estimate face liveness in order to prevent spoofin...
Capturer - Interface object for detecting or tracking of faces in the images or video sequences...
LightSmartPtr< CameraCalibrator >::tPtr Ptr
Alias for the type of a smart pointer to CameraCalibrator.
Definition: CameraCalibrator.h:48
LightSmartPtr< Capturer >::tPtr Ptr
Alias for the type of a smart pointer to Capturer.
Definition: Capturer.h:45
Parameters of the VideoWorker constructor.
Definition: VideoWorker.h:89
DepthLivenessEstimator - Interface object used to estimate face liveness in order to prevent spoofing...
EmotionsEstimator - Interface object for estimation of emotions.
A class used to override the configuration parameters at runtime.
Definition: Config.h:19
IRLivenessEstimator::Ptr createIRLivenessEstimator(const std::string ini_file) const
Creates an IRLivenessEstimator object. Thread-safe.
Definition: FacerecService.h:1963
LightSmartPtr< RawSample >::tPtr Ptr
Alias for the type of a smart pointer to RawSample.
Definition: RawSample.h:58
LightSmartPtr< QualityEstimator >::tPtr Ptr
Alias for the type of a smart pointer to QualityEstimator.
Definition: QualityEstimator.h:50
FaceQualityEstimator::Ptr createFaceQualityEstimator(const std::string ini_file) const
Creates a FaceQualityEstimator object. Thread-safe.
Definition: FacerecService.h:1526
Error - the class of exceptions thrown when errors occur.
Template - Interface object for saving the face template.
RawSample - Interface object that stores a captured face sample.
CameraCalibrator::Ptr createCameraCalibrator() const
Creates a CameraCalibrator object. Thread-safe.
Definition: FacerecService.h:1896
LivenessEstimator - Interface object used to estimate face liveness to prevent spoofing attacks...
Liveness2DEstimator::Ptr createLiveness2DEstimator(const std::string ini_file) const
Creates an Liveness2DEstimator object. Thread-safe.
Definition: FacerecService.h:2012
AgeGenderEstimator - interface object for age and gender estimation.
EmotionsEstimator::Ptr createEmotionsEstimator(const std::string ini_file) const
Creates a EmotionsEstimator object. Thread-safe.
Definition: FacerecService.h:1560
const std::string license_body
Сontent of a license.
Definition: FacerecService.h:87
std::vector< CounterState > counters
State of all license counters.
Definition: FacerecService.h:159
LightSmartPtr< Recognizer >::tPtr Ptr
Alias for the type of a smart pointer to Recognizer.
Definition: Recognizer.h:46
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 Intern...
Definition: FacerecService.h:2193
LightSmartPtr< FacerecService >::tPtr Ptr
Alias for the type of a smart pointer to FacerecService.
Definition: FacerecService.h:73
The class of exceptions thrown when errors occur.
Definition: Error.h:26
std::string ios_app_id
iOS application ID. Available only on iOS (tag <ios_app_id>).
Definition: FacerecService.h:147
Capturer::Ptr createCapturer(const pbio::FacerecService::Config config) const
Creates a Capturer object. Type and features depend on the content of the configuration file...
Definition: FacerecService.h:1461
VideoWorker::Ptr createVideoWorker(const pbio::VideoWorker::Params params) const
Creates a VideoWorker object. Thread-safe. When VideoWorker is created with matching_thread=0 and pr...
Definition: FacerecService.h:1680
Main library header.
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.
Definition: FacerecService.h:1580
std::string hardware_reg
Hardware signature (tag <Reg>).
Definition: FacerecService.h:153
void forceOnlineLicenseUpdate() const
Force online license update.
Definition: FacerecService.h:1449
LicenseState getLicenseState() const
Get the license state. Thread-safe.
Definition: FacerecService.h:2132
DepthLivenessEstimator::Ptr createDepthLivenessEstimator(const std::string ini_file) const
Creates a DepthLivenessEstimator object. Thread-safe.
Definition: FacerecService.h:1913
bool online
Online license flag.
Definition: FacerecService.h:128
int64_t value
Current value (number of used elements).
Definition: FacerecService.h:121
std::string name
Element name (equals to the tag name).
Definition: FacerecService.h:109
Storing the license as a string variable.
Definition: FacerecService.h:81
FaceAttributesEstimator is an interface object used to estimate attributes of the face...
AgeGenderEstimator::Ptr createAgeGenderEstimator(const std::string ini_file) const
Creates a AgeGenderEstimator object. Thread-safe.
Definition: FacerecService.h:1488
Definition: Context.h:37
LightSmartPtr< Liveness2DEstimator >::tPtr Ptr
Alias for the type of a smart pointer to Liveness2DEstimator.
Definition: Liveness2DEstimator.h:50
SmartPtr.
void freeAlgorithmsCache() const
Disable keeping algorithms data in memory. Thread-safe.
Definition: FacerecService.h:2181
IRLivenessEstimator is an interface object used to estimate face liveness in order to prevent spoofin...
std::string getVersion() const
Get version of face recognition library. Thread-safe.
Definition: FacerecService.h:1430
LightSmartPtr< FaceAttributesEstimator >::tPtr Ptr
Alias for the type of a smart pointer to FaceAttributesEstimator.
Definition: FaceAttributesEstimator.h:37
FaceAttributesEstimator::Ptr createFaceAttributesEstimator(const std::string ini_file) const
Creates an FaceAttributesEstimator object. Thread-safe.
Definition: FacerecService.h:2061
LightSmartPtr< LivenessEstimator >::tPtr Ptr
Alias for the type of a smart pointer to LivenessEstimator.
Definition: LivenessEstimator.h:42
Format
Format of image data.
Definition: IRawImage.h:46
LightSmartPtr< AgeGenderEstimator >::tPtr Ptr
Alias for the type of a smart pointer to AgeGenderEstimator.
Definition: AgeGenderEstimator.h:55
CheckType
Check type for active liveness.
Definition: ActiveLiveness.h:14
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 ...
Definition: FacerecService.h:2268
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...
Definition: FacerecService.h:1786
QualityEstimator::Ptr createQualityEstimator(const std::string ini_file) const
Creates a QualityEstimator object. Thread-safe.
Definition: FacerecService.h:1507
FaceQualityEstimator - Interface object for sample quality estimation.
License status.
Definition: FacerecService.h:97
LivenessEstimator::Ptr createLivenessEstimator() const
Creates a LivenessEstimator object. Thread-safe.
Definition: FacerecService.h:1544
LightSmartPtr< DepthLivenessEstimator >::tPtr Ptr
Alias for the type of a smart pointer to DepthLivenessEstimator.
Definition: DepthLivenessEstimator.h:43