IDLive Face C API 1.46.0
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions
FaceSDK_C_Api.h File Reference

Data Structures

struct  CMeta
 Meta information provided for calibration. More...
 
struct  CQualityResult
 Structure for quality estimation result. More...
 
struct  CLivenessResult
 Structure for liveness detection result. More...
 
struct  CPipelineResult
 Structure for liveness detection result. More...
 
struct  CBoundingBox
 Face rectangle bounding box. More...
 
struct  CBoundingBoxes
 Face rectangle bounding boxes array. More...
 
struct  CKeypoints
 Face keypoints structure. More...
 
struct  CHeadPose
 Set of yaw, pith, and roll angles (in degrees) More...
 
struct  CFaceParameters
 Structure for storing facial parameters. More...
 
struct  CDetectionResult
 Face detection result structure. More...
 
struct  CLicenseFeatureInfo
 IDLive Face license feature info. More...
 

Macros

#define MESSAGE_BUFFER_SIZE   256
 The default size for the buffer used for error messages (passed via msg argument).
 

Typedefs

typedef struct CInitConfig CInitConfig_t
 
typedef struct CImage CImage_t
 
typedef struct CImageBatch CImageBatch_t
 
typedef struct CPipeline CPipeline_t
 
typedef struct CDetectEngine CDetectEngine_t
 
typedef struct CQualityEngine CQualityEngine_t
 
typedef enum OS OS_t
 Meta information: OS type for calibration.
 
typedef enum MANUFACTURE MANUFACTURE_t
 Meta information: device manufacture.
 
typedef enum MODEL MODEL_t
 Meta information: device model.
 
typedef enum CALIBRATION CALIBRATION_t
 Liveness checking threshold calibration type.
 
typedef enum ThreadingLevel ThreadingLevel_t
 FaceSDK threading level, used to set different number of threads for different levels.
 
typedef struct CMeta CMeta_t
 
typedef enum COLOR_ENCODING COLOR_ENCODING_t
 Color encoding enum.
 
typedef struct CQualityResult CQualityResult_t
 
typedef struct CLivenessResult CLivenessResult_t
 
typedef struct CPipelineResult CPipelineResult_t
 
typedef struct CBoundingBox CBoundingBox_t
 
typedef struct CBoundingBoxes CBoundingBoxes_t
 
typedef struct CKeypoints CKeypoints_t
 
typedef struct CHeadPose CHeadPose_t
 
typedef struct CFaceParameters CFaceParameters_t
 
typedef struct CDetectionResult CDetectionResult_t
 
typedef enum LICENSE_FEATURE LICENSE_FEATURE_t
 IDLive Face license features.
 
typedef struct CLicenseFeatureInfo CLicenseFeatureInfo_t
 IDLive Face license feature info.
 

Enumerations

enum  STATUS {
  FACE_TOO_CLOSE , FACE_CLOSE_TO_BORDER , FACE_CROPPED , FACE_NOT_FOUND ,
  TOO_MANY_FACES , FACE_TOO_SMALL , FACE_ANGLE_TOO_LARGE , FAILED_TO_READ_IMAGE ,
  FAILED_TO_WRITE_IMAGE , FAILED_TO_READ_MODEL , FAILED_TO_BUILD_INTERPRETER , FAILED_TO_INVOKE_INTERPRETER ,
  FAILED_TO_ALLOCATE , INVALID_CONFIG , NO_SUCH_OBJECT_IN_BUILD , FAILED_TO_PREPROCESS_IMAGE_WHILE_PREDICT ,
  FAILED_TO_PREPROCESS_IMAGE_WHILE_DETECT , FAILED_TO_PREDICT_LANDMARKS , INVALID_FUSE_MODE , NULLPTR ,
  LICENSE_ERROR , INVALID_META , UNKNOWN , OK ,
  FACE_IS_OCCLUDED , FAILED_TO_FETCH_COREML_DECRYPTION_KEY , EYES_CLOSED
}
 Error codes enumeration. More...
 
enum  OS { ANDROID , IOS , DESKTOP , UNKNOWN_OS }
 Meta information: OS type for calibration.
 
enum  MANUFACTURE { UNKNOWN_MANUFACTURE }
 Meta information: device manufacture.
 
enum  MODEL { UNKNOWN_MODEL }
 Meta information: device model.
 
enum  CALIBRATION { REGULAR = 0 , SOFT = 1 , HARDENED = 2 }
 Liveness checking threshold calibration type. More...
 
enum  ThreadingLevel { PIPELINE = 0 , ENGINE = 1 , OPERATOR = 2 }
 FaceSDK threading level, used to set different number of threads for different levels. More...
 
enum  COLOR_ENCODING { RGB888 , BGR888 }
 Color encoding enum. More...
 
enum  LICENSE_FEATURE { PAD = 12 , DFD = 13 }
 IDLive Face license features. More...
 

Functions

CMeta_t get_default_meta ()
 Returns CMeta_t filled with default values.
 
CInitConfig_t * config_create (const char *folder, const char *config_name, int *err, char *msg)
 CInitConfig_t instance creator.
 
CInitConfig_t * config_create2 (const char *file_path, int *err, char *msg)
 CInitConfig_t instance creator.
 
void config_destroy (CInitConfig_t *config)
 CInitConfig_t instance destroyer.
 
CImage_t * image_create_bytes (const uint8_t *bytes, size_t size, int *err, char *msg)
 Create CImage_t instance from binary file in memory buffer.
 
CImage_t * image_create_path (const char *path, int *err, char *msg)
 Create CImage_t instance from a file on disk.
 
CImage_t * image_create_pixels (const uint8_t *data, size_t rows, size_t cols, COLOR_ENCODING_t format, int *err, char *msg)
 Create CImage_t instance from decoded memory buffer.
 
void image_destroy (CImage_t *image)
 CImage_t instance destroyer.
 
CImageBatch_t * image_batch_create (CImage_t **images, size_t num_images, const uint64_t *timestamps, int *err, char *msg)
 Create CImageBatch_t instance from CImage_t array and timestamps.
 
void image_batch_destroy (CImageBatch_t *image_batch)
 CImageBatch_t instance destroyer.
 
CDetectEngine_t * detection_create (const char *name, const CInitConfig_t *config, int *err, char *msg)
 Create CDetectEngine_t instance.
 
void detection_destroy (CDetectEngine_t *engine)
 CDetectEngine_t instance destroyer.
 
CDetectionResult_tdetect (const CDetectEngine_t *engine, const CImage_t *image, int *err, char *msg)
 Facial keypoints and bbox detecting method.
 
CDetectionResult_tdetect_batch (const CDetectEngine_t *engine, const CImage_t **images, size_t num_images, int *errors, char **msg)
 Facial keypoints and bbox batch detecting method.
 
CBoundingBoxes_tdetect_only_bounding_box (const CDetectEngine_t *engine, const CImage_t *image, int *err, char *msg)
 Facial bbox detecting method.
 
CBoundingBoxes_tdetect_only_bounding_box_batch (const CDetectEngine_t *engine, const CImage_t **images, size_t num_images, int *errors, char **msg)
 Facial bbox batch detecting method.
 
void CDetectionResult_destroy (CDetectionResult_t *result)
 CDetectionResult_t instance destroyer.
 
void CDetectionResult_destroy_array (CDetectionResult_t *result, size_t size)
 CDetectionResult_t instances array destroyer.
 
void CBoundingBoxes_destroy (CBoundingBoxes_t *result)
 CBoundingBoxes_t instance destroyer.
 
void CBoundingBoxes_destroy_array (CBoundingBoxes_t *result, size_t size)
 CBoundingBoxes_t instances array destroyer.
 
CQualityEngine_t * quality_create (const char *name, const CInitConfig_t *config, int *err, char *msg)
 Create CQualityEngine_t instance.
 
void quality_destroy (CQualityEngine_t *engine)
 CQualityEngine_t instance destroyer.
 
CQualityResult_t check_quality (const CQualityEngine_t *engine, const CImage_t *image, int *err, char *msg)
 Check quality of face from input image.
 
CQualityResult_tcheck_quality_batch (const CQualityEngine_t *engine, const CImage_t **images, size_t num_images, int *errors, char **msg)
 Check quality of face from input images batch.
 
void CQualityResult_destroy_array (CQualityResult_t *result)
 CQualityResult_t instances array destroyer.
 
CPipeline_t * pipeline_create (const char *name, const CInitConfig_t *config, int *err, char *msg)
 Create CPipeline_t instance.
 
void pipeline_destroy (CPipeline_t *engine)
 CPipeline_t instance destroyer.
 
CPipelineResult_t pipeline_check_liveness (const CPipeline_t *engine, const CImage_t *image, const CMeta_t *meta, int *err, char *msg)
 Check liveness of face from input image.
 
CPipelineResult_t pipeline_check_liveness_batch (const CPipeline_t *engine, const CImageBatch_t *image_batch, const CMeta_t *meta, int *err, char *msg)
 Perform liveness check on a sequence of photos (image batch). A single results corresponding to the whole image batch will be produced.
 
CPipelineResult_tpipeline_check_liveness_batch2 (const CPipeline_t *engine, const CImage_t **images, size_t num_images, const CMeta_t *meta, int *errors, char **msg)
 This method implements batched liveness check.
 
void CPipelineResult_destroy_array (CPipelineResult_t *result)
 CPipelineResult_t instances array destroyer.
 
void set_num_threads (unsigned int num_threads, const ThreadingLevel_t *threading_level, int *err, char *msg)
 Sets the maximum number of threads available for FaceSDK at the specified level. If 0 is passed, then the optimal number of threads is detected automatically (the same effect is achieved if setNumThreads is not called).
 
void set_ov_num_throughput_streams (int ov_num_throughput_streams)
 Sets the number of CPU execution streams for OpenVINO backend.
 
void set_ov_bind_threads (bool ov_bind_threads)
 Sets the CPU bind setting for OpenVINO backend.
 
void set_ov_max_batch_size (unsigned int ov_max_batch_size)
 Sets the maximum batch size for OpenVINO backend. This is not a hard limit (i.e. passing batches bigger than the limit will not cause an error), however setting this value to the target batch size will increase performance.
 
void set_enable_logging (bool enable_logging)
 Sets whether to enable FaceSDK logging. Logging is enabled by default.
 
void set_num_pipeline_execution_streams (unsigned int num_pipeline_execution_streams)
 Sets the maximum number of execution streams (maximum number of requests executed in concurrent) for Pipeline. Default value is number of logical CPU cores.
 
void set_enable_face_occlusion_detection (bool enabled)
 Toggles face occlusion detection. When enabled the occluded faces will be rejected.
 
void set_enable_closed_eyes_detection (bool enabled)
 Toggles closed eyes detection. When enabled the faces with closed eyes will be rejected.
 
CLicenseFeatureInfo_tget_license_features_info (size_t *num_license_features, int *err, char *msg)
 Returns information about all available licensed features.
 
void license_feature_info_array_destroy (CLicenseFeatureInfo_t *license_feature_info_arr)
 Destroys array of CLicenseFeatureInfo_t returned by @get_license_features_info.
 
void get_license_info (char *license_info, size_t license_info_length, int *err, char *msg)
 Returns information about a license if available.
 
void set_license (const char *license, size_t license_length, int *err, char *msg)
 Sets a new license to be used.
 
void set_message_buffer_size (size_t size)
 Sets the size for the buffer used for error messages (passed via msg argument). Longer messages will be truncated.
 

Detailed Description

FaceSDK C API header file

Macro Definition Documentation

◆ MESSAGE_BUFFER_SIZE

#define MESSAGE_BUFFER_SIZE   256

The default size for the buffer used for error messages (passed via msg argument).

You can change it with set_message_buffer_size if needed.

Enumeration Type Documentation

◆ CALIBRATION

Liveness checking threshold calibration type.

Enumerator
REGULAR 

Regular calibration, targets low APCER.

SOFT 

Soft calibration, achieves lower BPCER while still having acceptable APCER.

HARDENED 

Hardened calibration, targets extra low APCER with higher BPCER.

◆ COLOR_ENCODING

Color encoding enum.

Enumerator
RGB888 

Bytes in RGB format.

BGR888 

Bytes in BGR format.

◆ LICENSE_FEATURE

IDLive Face license features.

Enumerator
PAD 

Presentation attack detection functionality.

DFD 

Deepfake detection functionality.

◆ STATUS

enum STATUS

Error codes enumeration.

Enumerator
FACE_TOO_CLOSE 

A distance between face and image border is too small for preprocessing issues.

FACE_CLOSE_TO_BORDER 

Face is too close to one or more borders. May reduce the accuracy of spoofing detection because edges of face may not be seen.

FACE_CROPPED 

Face is cropped. May reduce the accuracy of spoofing detection because edges of face may not be seen.

FACE_NOT_FOUND 

Face detector can't find face on image.

TOO_MANY_FACES 

Face detector found more than one face on image.

FACE_TOO_SMALL 

Facial area is not big enough for analysis.

FACE_ANGLE_TOO_LARGE 

Facial out-of-plane rotation angle is extremely large.

FAILED_TO_READ_IMAGE 

File decoding error.

FAILED_TO_WRITE_IMAGE 

File encoding error.

FAILED_TO_READ_MODEL 

Model deserializing error.

FAILED_TO_BUILD_INTERPRETER 

tflite::Interpreter building error.

FAILED_TO_INVOKE_INTERPRETER 

tflite::Interpreter invoking error.

FAILED_TO_ALLOCATE 

Memory allocation error.

INVALID_CONFIG 

Config deserializing error.

NO_SUCH_OBJECT_IN_BUILD 

Engine or backend is not supported by the build.

FAILED_TO_PREPROCESS_IMAGE_WHILE_PREDICT 

Liveness prediction error.

FAILED_TO_PREPROCESS_IMAGE_WHILE_DETECT 

Face detection error.

FAILED_TO_PREDICT_LANDMARKS 

Landmarks prediction error.

INVALID_FUSE_MODE 

Invalid fuse mode provided.

NULLPTR 

Nullptr provided.

LICENSE_ERROR 

Some error occurred during license checking.

INVALID_META 

Invalid facesdk::Meta value provided.

UNKNOWN 

Unhandled exception in the code.

OK 

No errors.

FACE_IS_OCCLUDED 

The biggest face on the input image is occluded, so liveness check is not possible.

FAILED_TO_FETCH_COREML_DECRYPTION_KEY 

Failed to fetch CoreML model decryption key from Apple serve.rs.

EYES_CLOSED 

Eyes are closed.

◆ ThreadingLevel

FaceSDK threading level, used to set different number of threads for different levels.

Enumerator
PIPELINE 

Pipeline threading level, corresponding environment variable: FACESDK_NUM_THREADS_PIPELINE.

ENGINE 

Single engine (e.g. Pipeline, QualityEngine) threading level, corresponding environment variable: FACESDK_NUM_THREADS_ENGINE.

OPERATOR 

Single internal engine operator threading level, corresponding environment variable: FACESDK_NUM_THREADS_OPERATOR.

Function Documentation

◆ CBoundingBoxes_destroy()

void CBoundingBoxes_destroy ( CBoundingBoxes_t result)

CBoundingBoxes_t instance destroyer.

Parameters
[in]resultCBoundingBoxes_t instance

◆ CBoundingBoxes_destroy_array()

void CBoundingBoxes_destroy_array ( CBoundingBoxes_t result,
size_t  size 
)

CBoundingBoxes_t instances array destroyer.

Parameters
[in]resultPointer to CBoundingBoxes_t array
[in]sizeSize of CBoundingBoxes_t array

◆ CDetectionResult_destroy()

void CDetectionResult_destroy ( CDetectionResult_t result)

CDetectionResult_t instance destroyer.

Parameters
[in]resultCDetectionResult_t instance

◆ CDetectionResult_destroy_array()

void CDetectionResult_destroy_array ( CDetectionResult_t result,
size_t  size 
)

CDetectionResult_t instances array destroyer.

Parameters
[in]resultPointer to CDetectionResult_t array
[in]sizeLength of CDetectionResult_t array

◆ check_quality()

CQualityResult_t check_quality ( const CQualityEngine_t *  engine,
const CImage_t *  image,
int *  err,
char *  msg 
)

Check quality of face from input image.

Parameters
[in]engineCQualityEngine_t instance
[in]imageCImage_t instance
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE
Returns
Quality checking result

◆ check_quality_batch()

CQualityResult_t * check_quality_batch ( const CQualityEngine_t *  engine,
const CImage_t **  images,
size_t  num_images,
int *  errors,
char **  msg 
)

Check quality of face from input images batch.

Parameters
[in]engineCQualityEngine_t instance
[in]imagesPointer to CImage_t* array
[in]num_imagesLength of images array
[out]errorsOutput error codes array optional parameter, should have num_images length if provided
[out]msgOutput error messages array optional parameter, should have num_images length if provided.
See also
MESSAGE_BUFFER_SIZE
Returns
Pointer to CQualityResult_t array of num_images length, NULL if error occurred
Deprecated:
Using this function has no benefits compared to the usual check_quality function.

◆ config_create()

CInitConfig_t * config_create ( const char *  folder,
const char *  config_name,
int *  err,
char *  msg 
)

CInitConfig_t instance creator.

Parameters
[in]folderPath to directory with configuration files
[in]config_nameConfiguration file name
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE
Returns
Pointer to CInitConfig_t, NULL if error occurred

◆ config_create2()

CInitConfig_t * config_create2 ( const char *  file_path,
int *  err,
char *  msg 
)

CInitConfig_t instance creator.

Parameters
[in]file_pathFull path to configuration file
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE
Returns
Pointer to CInitConfig_t, NULL if error occurred

◆ config_destroy()

void config_destroy ( CInitConfig_t *  config)

CInitConfig_t instance destroyer.

Parameters
[in]configCInitConfig_t instance

◆ CPipelineResult_destroy_array()

void CPipelineResult_destroy_array ( CPipelineResult_t result)

CPipelineResult_t instances array destroyer.

Parameters
[in]resultPointer to CPipelineResult_t array

◆ CQualityResult_destroy_array()

void CQualityResult_destroy_array ( CQualityResult_t result)

CQualityResult_t instances array destroyer.

Parameters
[in]resultPointer to CQualityResult_t array

◆ detect()

CDetectionResult_t * detect ( const CDetectEngine_t *  engine,
const CImage_t *  image,
int *  err,
char *  msg 
)

Facial keypoints and bbox detecting method.

Parameters
[in]engineCDetectEngine_t instance
[in]imageCImage_t instance
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE
Returns
Pointer to CDetectionResult_t, NULL if error occurred

◆ detect_batch()

CDetectionResult_t * detect_batch ( const CDetectEngine_t *  engine,
const CImage_t **  images,
size_t  num_images,
int *  errors,
char **  msg 
)

Facial keypoints and bbox batch detecting method.

Parameters
[in]engineCDetectEngine_t instance
[in]imagesPointer to CImage_t* array
[in]num_imagesLength of images array
[out]errorsOutput error codes array optional parameter, should have num_images length if provided
[out]msgOutput error messages array optional parameter, should have num_images length if provided.
See also
MESSAGE_BUFFER_SIZE
Returns
Pointer to CDetectionResult_t array of num_images length, NULL if error occurred
Deprecated:
Using this function has no benefits compared to the usual detect function.

◆ detect_only_bounding_box()

CBoundingBoxes_t * detect_only_bounding_box ( const CDetectEngine_t *  engine,
const CImage_t *  image,
int *  err,
char *  msg 
)

Facial bbox detecting method.

Parameters
[in]engineCDetectEngine_t instance
[in]imageCImage_t instance
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE
Returns
Pointer to CBoundingBoxes_t, NULL if error occurred

◆ detect_only_bounding_box_batch()

CBoundingBoxes_t * detect_only_bounding_box_batch ( const CDetectEngine_t *  engine,
const CImage_t **  images,
size_t  num_images,
int *  errors,
char **  msg 
)

Facial bbox batch detecting method.

Parameters
[in]engineCDetectEngine_t instance
[in]imagesPointer to CImage_t* array
[in]num_imagesLength of images array
[out]errorsOutput error codes array optional parameter, should have num_images length if provided
[out]msgOutput error messages array optional parameter, should have num_images length if provided.
See also
MESSAGE_BUFFER_SIZE
Returns
Pointer to CBoundingBoxes_t array of num_images length, NULL if error occurred
Deprecated:
Using this function has no benefits compared to the usual detect_only_bounding_box function.

◆ detection_create()

CDetectEngine_t * detection_create ( const char *  name,
const CInitConfig_t *  config,
int *  err,
char *  msg 
)

Create CDetectEngine_t instance.

Parameters
[in]nameEngine name (e.g. "BaseNnetDetector")
[in]configConfiguration object
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE
Returns
Pointer to CDetectEngine_t, NULL if error occurred

◆ detection_destroy()

void detection_destroy ( CDetectEngine_t *  engine)

CDetectEngine_t instance destroyer.

Parameters
[in]engineCDetectEngine_t instance

◆ get_license_features_info()

CLicenseFeatureInfo_t * get_license_features_info ( size_t *  num_license_features,
int *  err,
char *  msg 
)

Returns information about all available licensed features.

Parameters
[out]num_license_featuresnumber of available licensed features.
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE
Returns
Array containing information about all available licensed features. Use @license_feature_info_array_destroy for deallocation.

◆ get_license_info()

void get_license_info ( char *  license_info,
size_t  license_info_length,
int *  err,
char *  msg 
)

Returns information about a license if available.

Deprecated:
Use @get_license_features_info
Parameters
[out]license_infoPreallocated char array to store null-terminated string containing license information
[in]license_info_lengthPreallocated char array length
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE

◆ image_batch_create()

CImageBatch_t * image_batch_create ( CImage_t **  images,
size_t  num_images,
const uint64_t *  timestamps,
int *  err,
char *  msg 
)

Create CImageBatch_t instance from CImage_t array and timestamps.

Parameters
[in]imagesPointer to CImage_t* array
[in]num_imagesLength of images array
[in]timestampsOptional timestamps array, should have num_images length if provided
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE
Returns
Pointer to CImageBatch_t, NULL if error occurred

◆ image_batch_destroy()

void image_batch_destroy ( CImageBatch_t *  image_batch)

CImageBatch_t instance destroyer.

Parameters
[in]image_batchCImageBatch_t instance

◆ image_create_bytes()

CImage_t * image_create_bytes ( const uint8_t *  bytes,
size_t  size,
int *  err,
char *  msg 
)

Create CImage_t instance from binary file in memory buffer.

Parameters
[in]bytesPointer to memory buffer with binary image file
[in]sizeNumber of bytes in image file
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE
Returns
Pointer to CImage_t, NULL if error occurred

◆ image_create_path()

CImage_t * image_create_path ( const char *  path,
int *  err,
char *  msg 
)

Create CImage_t instance from a file on disk.

Parameters
[in]pathPath to image file
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE
Returns
Pointer to CImage_t, NULL if error occurred

◆ image_create_pixels()

CImage_t * image_create_pixels ( const uint8_t *  data,
size_t  rows,
size_t  cols,
COLOR_ENCODING_t  format,
int *  err,
char *  msg 
)

Create CImage_t instance from decoded memory buffer.

Parameters
[in]dataPointer to memory buffer (bytes)
[in]rowsNumber of image rows
[in]colsNumber of image cols
[in]formatColor encoding format of input buffer
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE
Returns
Pointer to CImage_t, NULL if error occurred

◆ image_destroy()

void image_destroy ( CImage_t *  image)

CImage_t instance destroyer.

Parameters
[in]imageCImage_t instance

◆ license_feature_info_array_destroy()

void license_feature_info_array_destroy ( CLicenseFeatureInfo_t license_feature_info_arr)

Destroys array of CLicenseFeatureInfo_t returned by @get_license_features_info.

Parameters
[in]license_feature_info_arrPointer to license feature info array

◆ pipeline_check_liveness()

CPipelineResult_t pipeline_check_liveness ( const CPipeline_t *  engine,
const CImage_t *  image,
const CMeta_t meta,
int *  err,
char *  msg 
)

Check liveness of face from input image.

Parameters
[in]engineCPipeline_t instance
[in]imageCImage_t instance
[in]metaOptional meta information about device
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE
Returns
Liveness detection result

◆ pipeline_check_liveness_batch()

CPipelineResult_t pipeline_check_liveness_batch ( const CPipeline_t *  engine,
const CImageBatch_t *  image_batch,
const CMeta_t meta,
int *  err,
char *  msg 
)

Perform liveness check on a sequence of photos (image batch). A single results corresponding to the whole image batch will be produced.

Parameters
[in]engineCPipeline_t instance
[in]image_batchInput batch of images (a sequence of photos)
[in]metaOptional meta information about device
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE
Returns
A single liveness detection result for a given sequence of photos

◆ pipeline_check_liveness_batch2()

CPipelineResult_t * pipeline_check_liveness_batch2 ( const CPipeline_t *  engine,
const CImage_t **  images,
size_t  num_images,
const CMeta_t meta,
int *  errors,
char **  msg 
)

This method implements batched liveness check.

Parameters
[in]engineCPipeline_t instance
[in]imagesPointer to CImage_t* array
[in]num_imagesLength of images array
[in]metaOptional meta information about device array, should have num_images length if provided
[out]errorsOutput error codes array optional parameter, should have num_images length if provided
[out]msgOutput error messages array optional parameter, should have num_images length if provided.
See also
MESSAGE_BUFFER_SIZE
Returns
Pointer to CPipelineResult_t array of num_images length, NULL if error occurred
Deprecated:
Using this function has no benefits compared to the usual pipeline_check_liveness function.

◆ pipeline_create()

CPipeline_t * pipeline_create ( const char *  name,
const CInitConfig_t *  config,
int *  err,
char *  msg 
)

Create CPipeline_t instance.

Parameters
[in]namePipeline name (e.g. "ConfigurablePipeline")
[in]configConfiguration object
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE
Returns
Pointer to CPipeline_t, NULL if error occurred

◆ pipeline_destroy()

void pipeline_destroy ( CPipeline_t *  engine)

CPipeline_t instance destroyer.

Parameters
[in]engineCPipeline_t instance

◆ quality_create()

CQualityEngine_t * quality_create ( const char *  name,
const CInitConfig_t *  config,
int *  err,
char *  msg 
)

Create CQualityEngine_t instance.

Parameters
[in]nameEngine name (e.g. "ExpositionQualityEngine")
[in]configConfiguration object
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE
Returns
Pointer to CQualityEngine_t, NULL if error occurred

◆ quality_destroy()

void quality_destroy ( CQualityEngine_t *  engine)

CQualityEngine_t instance destroyer.

Parameters
[in]engineCQualityEngine_t instance

◆ set_enable_closed_eyes_detection()

void set_enable_closed_eyes_detection ( bool  enabled)

Toggles closed eyes detection. When enabled the faces with closed eyes will be rejected.

Parameters
[in]enabledWhether to enable the detection or not
Note
Function call is equivalent to setting FACESDK_ENABLE_CLOSED_EYES_DETECTION environment variable before loading FaceSDK library.
Function call takes precedence over environment variables.

◆ set_enable_face_occlusion_detection()

void set_enable_face_occlusion_detection ( bool  enabled)

Toggles face occlusion detection. When enabled the occluded faces will be rejected.

Parameters
[in]enabledWhether to enable the detection or not
Note
Function call is equivalent to setting FACESDK_ENABLE_FACE_OCCLUSION_DETECTION environment variable before loading FaceSDK library.
Function call takes precedence over environment variables.

◆ set_enable_logging()

void set_enable_logging ( bool  enable_logging)

Sets whether to enable FaceSDK logging. Logging is enabled by default.

Parameters
[in]enable_loggingWhether to enable logging or not
Note
Function call is equivalent to setting FACESDK_ENABLE_LOGGING environment variable before loading FaceSDK library.
Function call takes precedence over environment variables.

◆ set_license()

void set_license ( const char *  license,
size_t  license_length,
int *  err,
char *  msg 
)

Sets a new license to be used.

Sets a new license to be used. On Mobile builds (Android and iOS) and Lambda SDK distributions this function can be used to update the license by passing the contents of a new license file.

Parameters
[in]licensechar array with the license data
[in]license_lengthlength of the char array containing the license
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE

◆ set_message_buffer_size()

void set_message_buffer_size ( size_t  size)

Sets the size for the buffer used for error messages (passed via msg argument). Longer messages will be truncated.

Parameters
[in]sizeSize of the buffer. Passing 0 has no effect.

◆ set_num_pipeline_execution_streams()

void set_num_pipeline_execution_streams ( unsigned int  num_pipeline_execution_streams)

Sets the maximum number of execution streams (maximum number of requests executed in concurrent) for Pipeline. Default value is number of logical CPU cores.

Parameters
[in]num_pipeline_execution_streamsNumber of execution streams
Note
Function call does not take any effect, reserved for future usage.
Function call is equivalent to setting FACESDK_NUM_PIPELINE_EXECUTION_STREAMS environment variable before loading FaceSDK library.
Function call takes precedence over environment variables.

◆ set_num_threads()

void set_num_threads ( unsigned int  num_threads,
const ThreadingLevel_t threading_level,
int *  err,
char *  msg 
)

Sets the maximum number of threads available for FaceSDK at the specified level. If 0 is passed, then the optimal number of threads is detected automatically (the same effect is achieved if setNumThreads is not called).

Parameters
[in]num_threadsMaximum number of threads available for FaceSDK at the specified level
[in]threading_levelThreading level to apply setting
[out]errOutput error code optional parameter
[out]msgOutput error message optional parameter.
See also
MESSAGE_BUFFER_SIZE
Note
Function call is equivalent to setting FACESDK_NUM_THREADS_PIPELINE, FACESDK_NUM_THREADS_ENGINE or FACESDK_NUM_THREADS_OPERATOR environment variable before loading FaceSDK library.
Function call takes precedence over environment variables.

◆ set_ov_bind_threads()

void set_ov_bind_threads ( bool  ov_bind_threads)

Sets the CPU bind setting for OpenVINO backend.

Parameters
[in]ov_bind_threadsWhether to bind execution threads to CPU physical cores or not
Note
Function call is equivalent to setting FACESDK_OV_BIND_THREADS environment variable before loading FaceSDK library.
Function call takes precedence over environment variables.
Function does not take effect if FaceSDK build does not use OpenVINO.

◆ set_ov_max_batch_size()

void set_ov_max_batch_size ( unsigned int  ov_max_batch_size)

Sets the maximum batch size for OpenVINO backend. This is not a hard limit (i.e. passing batches bigger than the limit will not cause an error), however setting this value to the target batch size will increase performance.

Parameters
[in]ov_max_batch_sizeMaximum batch size
Note
Function call is equivalent to setting FACESDK_OV_MAX_BATCH_SIZE environment variable before loading FaceSDK library.
Function call takes precedence over environment variables.
Function does not take effect if FaceSDK build does not use OpenVINO.

◆ set_ov_num_throughput_streams()

void set_ov_num_throughput_streams ( int  ov_num_throughput_streams)

Sets the number of CPU execution streams for OpenVINO backend.

Parameters
[in]ov_num_throughput_streamsNumber of CPU execution streams, valid values are -1 (auto-tune number of streams), 0 (use the default setting) and any positive value, other values are dropped without an error
Note
Function call is equivalent to setting FACESDK_OV_NUM_THROUGHPUT_STREAMS environment variable before loading FaceSDK library.
Function call takes precedence over environment variables.
Function does not take effect if FaceSDK build does not use OpenVINO.