|
Scanbot SDK
|
Typedefs | |
| typedef struct scanbotsdk_mrz_scanner_t | scanbotsdk_mrz_scanner_t |
| scanbotsdk_mrz_scanner_t class | |
| typedef struct scanbotsdk_mrz_parser_t | scanbotsdk_mrz_parser_t |
| scanbotsdk_mrz_parser_t class | |
| typedef enum scanbotsdk_mrz_document_type_t | scanbotsdk_mrz_document_type_t |
| scanbotsdk_mrz_document_type_t enum | |
| typedef struct scanbotsdk_mrz_scanner_result_t | scanbotsdk_mrz_scanner_result_t |
| scanbotsdk_mrz_scanner_result_t class | |
| typedef enum scanbotsdk_mrz_incomplete_result_handling_t | scanbotsdk_mrz_incomplete_result_handling_t |
| scanbotsdk_mrz_incomplete_result_handling_t enum | |
| typedef struct scanbotsdk_mrz_scanner_configuration_t | scanbotsdk_mrz_scanner_configuration_t |
| scanbotsdk_mrz_scanner_configuration_t class | |
| typedef struct scanbotsdk_mrz_parser_configuration_t | scanbotsdk_mrz_parser_configuration_t |
| scanbotsdk_mrz_parser_configuration_t class | |
scanbotsdk_mrz_document_type_t enum
Type of document containing the MRZ.
| typedef enum scanbotsdk_mrz_incomplete_result_handling_t scanbotsdk_mrz_incomplete_result_handling_t |
scanbotsdk_mrz_incomplete_result_handling_t enum
Defines how to handle incomplete MRZ results (e.g. caused by failed validation).
scanbotsdk_mrz_parser_configuration_t class
Configuration for MRZ parser.
| typedef struct scanbotsdk_mrz_parser_t scanbotsdk_mrz_parser_t |
scanbotsdk_mrz_parser_t class
API for machine readable zone parsing.
Required licence feature(s): MrzScanner.
scanbotsdk_mrz_scanner_configuration_t class
Configuration for MRZ scanner.
| typedef struct scanbotsdk_mrz_scanner_result_t scanbotsdk_mrz_scanner_result_t |
scanbotsdk_mrz_scanner_result_t class
Container for result of MRZ scanning attempt.
| typedef struct scanbotsdk_mrz_scanner_t scanbotsdk_mrz_scanner_t |
scanbotsdk_mrz_scanner_t class
API for machine readable zone scanning.
Required licence feature(s): MrzScanner.
scanbotsdk_mrz_document_type_t enum
Type of document containing the MRZ.
scanbotsdk_mrz_incomplete_result_handling_t enum
Defines how to handle incomplete MRZ results (e.g. caused by failed validation).
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_document_type_t_to_string | ( | scanbotsdk_mrz_document_type_t | value, |
| const char ** | result ) |
Returns the string representation of the given scanbotsdk_mrz_document_type_t value.
The returned string doesn't need to be freed.
| value | The value to be converted to string. |
| result | Pointer to a variable that will store the string representation of the value. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_incomplete_result_handling_t_to_string | ( | scanbotsdk_mrz_incomplete_result_handling_t | value, |
| const char ** | result ) |
Returns the string representation of the given scanbotsdk_mrz_incomplete_result_handling_t value.
The returned string doesn't need to be freed.
| value | The value to be converted to string. |
| result | Pointer to a variable that will store the string representation of the value. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_parser_configuration_create | ( | scanbotsdk_mrz_incomplete_result_handling_t | incomplete_result_handling, |
| scanbotsdk_mrz_parser_configuration_t ** | result ) |
Creates a new instance of scanbotsdk_mrz_parser_configuration with given params and stores it in the location specified by the last argument.
As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.
| incomplete_result_handling | Defines how to handle incomplete MRZ results (e.g. caused by failed validation). |
Default is ACCEPT
| result | Pointer to a variable that will store the created instance of scanbotsdk_mrz_parser_configuration_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_parser_configuration_create_with_defaults | ( | scanbotsdk_mrz_parser_configuration_t ** | result | ) |
Creates a new instance of scanbotsdk_mrz_parser_configuration_t with given required params and stores it in the location specified by the last argument.
As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.
| result | Pointer to a variable that will store the created instance of scanbotsdk_mrz_parser_configuration_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_parser_configuration_free | ( | scanbotsdk_mrz_parser_configuration_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_mrz_parser_configuration_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_mrz_parser_configuration_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_parser_configuration_get_incomplete_result_handling | ( | scanbotsdk_mrz_parser_configuration_t * | self, |
| scanbotsdk_mrz_incomplete_result_handling_t * | incomplete_result_handling ) |
Returns value of incomplete_result_handling field of the given object.
Defines how to handle incomplete MRZ results (e.g. caused by failed validation).
Default is ACCEPT
| self | Pointer to the instance of scanbotsdk_mrz_parser_configuration_t |
| incomplete_result_handling | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_parser_configuration_set_incomplete_result_handling | ( | scanbotsdk_mrz_parser_configuration_t * | self, |
| scanbotsdk_mrz_incomplete_result_handling_t | incomplete_result_handling ) |
Sets value of incomplete_result_handling field of the given object.
Defines how to handle incomplete MRZ results (e.g. caused by failed validation).
Default is ACCEPT
As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.
| self | Pointer to the instance of scanbotsdk_mrz_parser_configuration_t, the field of which will be set |
| incomplete_result_handling | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_parser_create | ( | scanbotsdk_mrz_parser_configuration_t * | configuration, |
| scanbotsdk_mrz_parser_t ** | result ) |
Creates a new instance of scanbotsdk_mrz_parser with given params and stores it in the location specified by the last argument.
As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.
| configuration | The configuration to use for the parser. The value must not be null. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_mrz_parser_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_parser_free | ( | scanbotsdk_mrz_parser_t * | self | ) |
Frees the memory allocated for the instance of scanbotsdk_mrz_parser_t. If null is passed, the function does nothing.
| self | Pointer to the instance of scanbotsdk_mrz_parser_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_parser_parse | ( | scanbotsdk_mrz_parser_t * | self, |
| const char * | text, | ||
| scanbotsdk_mrz_scanner_result_t ** | result ) |
Parse the MRZ string.
As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.
| self | Pointer to the instance of scanbotsdk_mrz_parser_t method to be called on |
| text | The MRZ string to parse. Should be formatted with newlines. The value must not be null. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_mrz_parser_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_clear_result | ( | scanbotsdk_mrz_scanner_t * | self | ) |
Clears the accumulated results. Should be called after a document has been recognized to the customers satisfaction to prevent a poisoned cache.
As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.
| self | Pointer to the instance of scanbotsdk_mrz_scanner_t method to be called on |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_configuration_create | ( | scanbotsdk_accumulated_results_verifier_configuration_t * | frame_accumulation_configuration, |
| bool | enable_detection, | ||
| scanbotsdk_mrz_incomplete_result_handling_t | incomplete_result_handling, | ||
| bool | return_crops, | ||
| scanbotsdk_mrz_scanner_configuration_t ** | result ) |
Creates a new instance of scanbotsdk_mrz_scanner_configuration with given params and stores it in the location specified by the last argument.
As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.
| frame_accumulation_configuration | Configure the frame accumulation process. The value must not be null. |
| enable_detection | Enable MRZ detection. If disabled, the scanner skips the detection step and assumes that the input image is a crop of the MRZ area. |
Default is true
| incomplete_result_handling | Defines how to handle incomplete MRZ results (e.g. caused by failed validation). |
Default is REJECT
| return_crops | If true, crops of the detected MRZ and its fields will be returned in the result. |
Default is false
| result | Pointer to a variable that will store the created instance of scanbotsdk_mrz_scanner_configuration_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_configuration_create_with_defaults | ( | scanbotsdk_mrz_scanner_configuration_t ** | result | ) |
Creates a new instance of scanbotsdk_mrz_scanner_configuration_t with given required params and stores it in the location specified by the last argument.
As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.
| result | Pointer to a variable that will store the created instance of scanbotsdk_mrz_scanner_configuration_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_configuration_free | ( | scanbotsdk_mrz_scanner_configuration_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_mrz_scanner_configuration_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_mrz_scanner_configuration_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_configuration_get_enable_detection | ( | scanbotsdk_mrz_scanner_configuration_t * | self, |
| bool * | enable_detection ) |
Returns value of enable_detection field of the given object.
Enable MRZ detection. If disabled, the scanner skips the detection step and assumes that the input image is a crop of the MRZ area.
Default is true
| self | Pointer to the instance of scanbotsdk_mrz_scanner_configuration_t |
| enable_detection | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_configuration_get_frame_accumulation_configuration | ( | scanbotsdk_mrz_scanner_configuration_t * | self, |
| scanbotsdk_accumulated_results_verifier_configuration_t ** | frame_accumulation_configuration ) |
Returns value of frame_accumulation_configuration field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Configure the frame accumulation process.
| self | Pointer to the instance of scanbotsdk_mrz_scanner_configuration_t |
| frame_accumulation_configuration | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_configuration_get_incomplete_result_handling | ( | scanbotsdk_mrz_scanner_configuration_t * | self, |
| scanbotsdk_mrz_incomplete_result_handling_t * | incomplete_result_handling ) |
Returns value of incomplete_result_handling field of the given object.
Defines how to handle incomplete MRZ results (e.g. caused by failed validation).
Default is REJECT
| self | Pointer to the instance of scanbotsdk_mrz_scanner_configuration_t |
| incomplete_result_handling | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_configuration_get_return_crops | ( | scanbotsdk_mrz_scanner_configuration_t * | self, |
| bool * | return_crops ) |
Returns value of return_crops field of the given object.
If true, crops of the detected MRZ and its fields will be returned in the result.
Default is false
| self | Pointer to the instance of scanbotsdk_mrz_scanner_configuration_t |
| return_crops | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_configuration_set_enable_detection | ( | scanbotsdk_mrz_scanner_configuration_t * | self, |
| bool | enable_detection ) |
Sets value of enable_detection field of the given object.
Enable MRZ detection. If disabled, the scanner skips the detection step and assumes that the input image is a crop of the MRZ area.
Default is true
As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.
| self | Pointer to the instance of scanbotsdk_mrz_scanner_configuration_t, the field of which will be set |
| enable_detection | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_configuration_set_frame_accumulation_configuration | ( | scanbotsdk_mrz_scanner_configuration_t * | self, |
| scanbotsdk_accumulated_results_verifier_configuration_t * | frame_accumulation_configuration ) |
Sets value of frame_accumulation_configuration field of the given object.
Configure the frame accumulation process.
As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.
| self | Pointer to the instance of scanbotsdk_mrz_scanner_configuration_t, the field of which will be set |
| frame_accumulation_configuration | The value to be set. Must not be null. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_configuration_set_incomplete_result_handling | ( | scanbotsdk_mrz_scanner_configuration_t * | self, |
| scanbotsdk_mrz_incomplete_result_handling_t | incomplete_result_handling ) |
Sets value of incomplete_result_handling field of the given object.
Defines how to handle incomplete MRZ results (e.g. caused by failed validation).
Default is REJECT
As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.
| self | Pointer to the instance of scanbotsdk_mrz_scanner_configuration_t, the field of which will be set |
| incomplete_result_handling | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_configuration_set_return_crops | ( | scanbotsdk_mrz_scanner_configuration_t * | self, |
| bool | return_crops ) |
Sets value of return_crops field of the given object.
If true, crops of the detected MRZ and its fields will be returned in the result.
Default is false
As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.
| self | Pointer to the instance of scanbotsdk_mrz_scanner_configuration_t, the field of which will be set |
| return_crops | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_create | ( | scanbotsdk_mrz_scanner_configuration_t * | configuration, |
| scanbotsdk_mrz_scanner_t ** | result ) |
Creates a new instance of scanbotsdk_mrz_scanner with given params and stores it in the location specified by the last argument.
As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.
| configuration | The configuration to use for the scanner. The value must not be null. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_mrz_scanner_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_free | ( | scanbotsdk_mrz_scanner_t * | self | ) |
Frees the memory allocated for the instance of scanbotsdk_mrz_scanner_t. If null is passed, the function does nothing.
| self | Pointer to the instance of scanbotsdk_mrz_scanner_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_result_free | ( | scanbotsdk_mrz_scanner_result_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_mrz_scanner_result_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_mrz_scanner_result_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_result_get_document | ( | scanbotsdk_mrz_scanner_result_t * | self, |
| scanbotsdk_generic_document_t ** | document ) |
Returns value of document field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Generic document containing MRZ data.
| self | Pointer to the instance of scanbotsdk_mrz_scanner_result_t |
| document | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_result_get_raw_mrz | ( | scanbotsdk_mrz_scanner_result_t * | self, |
| const char ** | raw_mrz ) |
Returns value of raw_mrz field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Raw string value of MRZ.
| self | Pointer to the instance of scanbotsdk_mrz_scanner_result_t |
| raw_mrz | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_result_get_success | ( | scanbotsdk_mrz_scanner_result_t * | self, |
| bool * | success ) |
Returns value of success field of the given object.
Scanning successful.
Default is false
| self | Pointer to the instance of scanbotsdk_mrz_scanner_result_t |
| success | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_mrz_scanner_run | ( | scanbotsdk_mrz_scanner_t * | self, |
| scanbotsdk_image_t * | image, | ||
| scanbotsdk_mrz_scanner_result_t ** | result ) |
Recognize the MRZ in the given image.
As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.
| self | Pointer to the instance of scanbotsdk_mrz_scanner_t method to be called on |
| image | The image to recognize. The value must not be null. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_mrz_scanner_t |