DocSDK
2.4.1
|
Go to the source code of this file.
Data Structures | |
struct | DocSdkLivenessPipelineResult |
Liveness pipeline result. More... | |
struct | DocSdkLivenessCheckOptions |
Configurable options used for document liveness check. More... | |
struct | DocSdkFeature |
DocSDK feature information. More... | |
struct | DocSdkLicenseInfo |
Information about DocSDK features available with the installed license. More... | |
Typedefs | |
typedef struct DocSdkImage | DocSdkImage |
Image representation. More... | |
typedef struct DocSdkLivenessPipeline | DocSdkLivenessPipeline |
Document liveness checking pipeline. More... | |
typedef enum DocSdkErrorCode | DocSdkErrorCode |
DocSDK error codes enumeration. More... | |
typedef enum DocSdkColorEncoding | DocSdkColorEncoding |
Image color encoding. More... | |
typedef enum DocSdkValidationStatusCode | DocSdkValidationStatusCode |
Image validation status code (image validation is performed beforehand each liveness check) More... | |
typedef enum DocSdkImageQualityWarning | DocSdkImageQualityWarning |
Image quality warning (image quality check is performed along with liveness check) More... | |
typedef struct DocSdkLivenessPipelineResult | DocSdkLivenessPipelineResult |
Liveness pipeline result. More... | |
typedef enum DocSdkLivenessCheckCalibration | DocSdkLivenessCheckCalibration |
Score/threshold calibration to be used for document liveness check. More... | |
typedef struct DocSdkLivenessCheckOptions | DocSdkLivenessCheckOptions |
Configurable options used for document liveness check. More... | |
typedef enum DocSdkAttackType | DocSdkAttackType |
Document spoofing attack type. More... | |
typedef struct DocSdkFeature | DocSdkFeature |
DocSDK feature information. More... | |
typedef struct DocSdkLicenseInfo | DocSdkLicenseInfo |
Information about DocSDK features available with the installed license. More... | |
Functions | |
DOCSDK_API void | DocSdkSetErrorLogCallback (void(*callback)(DocSdkErrorCode, const char *)) |
DOCSDK_API void | DocSdkSetNumThreads (unsigned int num_threads) |
Sets the maximum number of CPU threads available for DocSDK. If 0 is passed, then the optimal number of CPU threads is detected automatically (the same effect is achieved if the function is not called). More... | |
DOCSDK_API DocSdkLicenseInfo * | DocSdkGetLicenseInfo (DocSdkErrorCode *error_code) |
Returns information (e.g. supported features and expiration dates) about the installed license if available. More... | |
DOCSDK_API void | DocSdkDestroyLicenseInfo (DocSdkLicenseInfo *license_info) |
DOCSDK_API void | DocSdkSetRuntimeLicense (const char *license_str, DocSdkErrorCode *error_code) |
Sets the runtime license. Only takes effect in "Lambda" SDK distribution and should be called before any other SDK invocation. More... | |
DOCSDK_API DocSdkImage * | DocSdkCreateImageFromBuffer (const uint8_t *bytes, size_t size, DocSdkErrorCode *error_code) |
DOCSDK_API DocSdkImage * | DocSdkCreateImageFromFile (const char *file_path, DocSdkErrorCode *error_code) |
DOCSDK_API DocSdkImage * | DocSdkCreateImageFromRawData (const uint8_t *data, size_t num_rows, size_t num_cols, DocSdkColorEncoding encoding, DocSdkErrorCode *error_code) |
DOCSDK_API void | DocSdkDestroyImage (DocSdkImage *image) |
DOCSDK_API DocSdkLivenessPipeline * | DocSdkCreateLivenessPipeline (const char *config_path, DocSdkErrorCode *error_code) |
DOCSDK_API void | DocSdkDestroyLivenessPipeline (DocSdkLivenessPipeline *liveness_pipeline) |
DOCSDK_API DocSdkLivenessCheckOptions | DocSdkLivenessCheckOptionsDefault () |
DOCSDK_API DocSdkLivenessPipelineResult | DocSdkLivenessPipelineCheckLiveness (DocSdkLivenessPipeline *liveness_pipeline, DocSdkImage *image, DocSdkLivenessCheckOptions *options, DocSdkErrorCode *error_code) |
DOCSDK_API DocSdkLivenessPipelineResult | DocSdkLivenessPipelineCheckLivenessSequence (DocSdkLivenessPipeline *liveness_pipeline, DocSdkImage **images, size_t num_images, DocSdkLivenessCheckOptions *options, DocSdkErrorCode *error_code) |
IDLive Doc SDK C API
typedef enum DocSdkAttackType DocSdkAttackType |
Document spoofing attack type.
typedef enum DocSdkColorEncoding DocSdkColorEncoding |
Image color encoding.
typedef enum DocSdkErrorCode DocSdkErrorCode |
DocSDK error codes enumeration.
typedef struct DocSdkFeature DocSdkFeature |
DocSDK feature information.
typedef struct DocSdkImage DocSdkImage |
Image representation.
typedef enum DocSdkImageQualityWarning DocSdkImageQualityWarning |
Image quality warning (image quality check is performed along with liveness check)
typedef struct DocSdkLicenseInfo DocSdkLicenseInfo |
Information about DocSDK features available with the installed license.
Score/threshold calibration to be used for document liveness check.
typedef struct DocSdkLivenessCheckOptions DocSdkLivenessCheckOptions |
Configurable options used for document liveness check.
typedef struct DocSdkLivenessPipeline DocSdkLivenessPipeline |
Document liveness checking pipeline.
typedef struct DocSdkLivenessPipelineResult DocSdkLivenessPipelineResult |
Liveness pipeline result.
typedef enum DocSdkValidationStatusCode DocSdkValidationStatusCode |
Image validation status code (image validation is performed beforehand each liveness check)
enum DocSdkAttackType |
Document spoofing attack type.
enum DocSdkColorEncoding |
enum DocSdkErrorCode |
DocSDK error codes enumeration.
Image quality warning (image quality check is performed along with liveness check)
Enumerator | |
---|---|
kDocSdkImageQualityWarningRelativeDocumentSizeLowerThan10Percent | Document size (area) is lower than 10% of the frame size |
kDocSdkImageQualityWarningDocumentBordersOutsideOfFrame | Document border(s) are outside of the frame, corresponds to kDocSdkValidationStatusCodeDocumentCropped |
kDocSdkImageQualityWarningMultipleDocumentsInFrame | More than one document are present in the frame, corresponds to kDocSdkValidationStatusCodeTooManyDocuments |
kDocSdkImageQualityWarningDocumentTooCloseToBorder | Document is too close to the frame border |
kDocSdkImageQualityWarningImageTooBlurry | Image is too blurry |
kDocSdkImageQualityWarningImageTooCompressed | Image is too compressed |
kDocSdkImageQualityWarningPoorImageExposure | Image is either too bright or too dark |
kDocSdkImageQualityWarningGlareOnImage | Image has glare |
Score/threshold calibration to be used for document liveness check.
Image validation status code (image validation is performed beforehand each liveness check)
Enumerator | |
---|---|
kDocSdkValidationStatusCodeOk | Validation successful |
kDocSdkValidationStatusCodeDocumentTooCloseToCamera | Document is too close to the camera |
kDocSdkValidationStatusCodeDocumentTooCloseToBorder | Document is too close to the image border |
kDocSdkValidationStatusCodeDocumentCropped | Document is cropped (part of the document is not present in the image), corresponds to kDocSdkImageQualityWarningDocumentBordersOutsideOfFrame |
kDocSdkValidationStatusCodeDocumentNotFound | Document is not detected in the image |
kDocSdkValidationStatusCodeDocumentTooSmall | Document size in the image is too small |
kDocSdkValidationStatusCodeTooManyDocuments | Too many documents were detected in the image, corresponds to kDocSdkImageQualityWarningMultipleDocumentsInFrame |
kDocSdkValidationStatusCodeDocumentIsColorless | Document is colorless (black and white) |
kDocSdkValidationStatusCodeDocumentPhotoNotFound | Document photo is not detected in the image |
DOCSDK_API DocSdkImage* DocSdkCreateImageFromBuffer | ( | const uint8_t * | bytes, |
size_t | size, | ||
DocSdkErrorCode * | error_code | ||
) |
Image factory method, creates Image from a buffer containing image file contents.
bytes | [in] Pointer to a buffer containing image file contents |
size | [in] Buffer size |
error_code | [out] Error code |
DOCSDK_API DocSdkImage* DocSdkCreateImageFromFile | ( | const char * | file_path, |
DocSdkErrorCode * | error_code | ||
) |
Image factory method, creates Image from an image file using given file path.
file_path | [in] Null-terminated string containing path to the image file |
error_code | [out] Error code |
DOCSDK_API DocSdkImage* DocSdkCreateImageFromRawData | ( | const uint8_t * | data, |
size_t | num_rows, | ||
size_t | num_cols, | ||
DocSdkColorEncoding | encoding, | ||
DocSdkErrorCode * | error_code | ||
) |
Image factory method, creates Image from raw color data.
data | [in] Raw color data (three-dimensional array containing color channel values for each image pixel) |
num_rows | [in] Number of image rows |
num_cols | [in] Number of image columns |
encoding | Image color encoding |
error_code | [out] Error code |
DOCSDK_API DocSdkLivenessPipeline* DocSdkCreateLivenessPipeline | ( | const char * | config_path, |
DocSdkErrorCode * | error_code | ||
) |
Liveness pipeline factory method.
config_path | [in] Null-terminated string containing path to liveness pipeline configuration file |
error_code | [out] Error code |
DOCSDK_API void DocSdkDestroyImage | ( | DocSdkImage * | image | ) |
Destroys DocSdkImage instance.
image | [in] Pointer to DocSdkImage instance |
DOCSDK_API void DocSdkDestroyLicenseInfo | ( | DocSdkLicenseInfo * | license_info | ) |
Destroys DocSdkLicenseInfo instance.
license_info | [in] Pointer to DocSdkLicenseInfo instance |
DOCSDK_API void DocSdkDestroyLivenessPipeline | ( | DocSdkLivenessPipeline * | liveness_pipeline | ) |
Destroys DocSdkLivenessPipeline instance.
liveness_pipeline | [in] Pointer to DocSdkLivenessPipeline instance |
DOCSDK_API DocSdkLicenseInfo* DocSdkGetLicenseInfo | ( | DocSdkErrorCode * | error_code | ) |
Returns information (e.g. supported features and expiration dates) about the installed license if available.
error_code | [out] Error code |
DOCSDK_API DocSdkLivenessCheckOptions DocSdkLivenessCheckOptionsDefault | ( | ) |
Default-initializes DocSdkLivenessCheckOptions instance.
DOCSDK_API DocSdkLivenessPipelineResult DocSdkLivenessPipelineCheckLiveness | ( | DocSdkLivenessPipeline * | liveness_pipeline, |
DocSdkImage * | image, | ||
DocSdkLivenessCheckOptions * | options, | ||
DocSdkErrorCode * | error_code | ||
) |
Checks liveness using the provided document photo.
liveness_pipeline | [in] Pointer to DocSdkLivenessPipeline instance |
image | [in] Image containing the photo of document |
options | [in] Liveness check options, can be NULL |
error_code | [out] Error code |
DOCSDK_API DocSdkLivenessPipelineResult DocSdkLivenessPipelineCheckLivenessSequence | ( | DocSdkLivenessPipeline * | liveness_pipeline, |
DocSdkImage ** | images, | ||
size_t | num_images, | ||
DocSdkLivenessCheckOptions * | options, | ||
DocSdkErrorCode * | error_code | ||
) |
Performs liveness check using a sequence of photos (e.g. taken from video) producing a single aggregated liveness checking result.
liveness_pipeline | [in] Pointer to DocSdkLivenessPipeline instance |
images | [in] Images array (photo sequence) |
num_images | [in] Images array size |
options | [in] Liveness check options, can be NULL |
error_code | [out] Error code |
DOCSDK_API void DocSdkSetErrorLogCallback | ( | void(*)(DocSdkErrorCode, const char *) | callback | ) |
Sets error logging callback. By default, all error messages are printed to stderr. Callback accepts two parameters: an error code and a null-terminated string containing error description.
callback | [in] Pointer to a function for handling error messages |
DOCSDK_API void DocSdkSetNumThreads | ( | unsigned int | num_threads | ) |
Sets the maximum number of CPU threads available for DocSDK. If 0 is passed, then the optimal number of CPU threads is detected automatically (the same effect is achieved if the function is not called).
num_threads | Maximum number of CPU threads available for DocSDK |
DOCSDK_API void DocSdkSetRuntimeLicense | ( | const char * | license_str, |
DocSdkErrorCode * | error_code | ||
) |
Sets the runtime license. Only takes effect in "Lambda" SDK distribution and should be called before any other SDK invocation.
license_str | [in] String holding the license content |
error_code | [out] Error code |