Scanbot SDK
Loading...
Searching...
No Matches
Scanbot C SDK Mrz

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
 

Enumerations

enum  scanbotsdk_mrz_document_type_t {
  SCANBOTSDK_MRZ_DOCUMENT_TYPE_UNKNOWN = 0 ,
  SCANBOTSDK_MRZ_DOCUMENT_TYPE_CREW_MEMBER_CERTIFICATE = 1 ,
  SCANBOTSDK_MRZ_DOCUMENT_TYPE_ID_CARD = 2 ,
  SCANBOTSDK_MRZ_DOCUMENT_TYPE_PASSPORT = 3 ,
  SCANBOTSDK_MRZ_DOCUMENT_TYPE_VISA = 4 ,
  SCANBOTSDK_MRZ_DOCUMENT_TYPE_CH_DRIVING_LICENSE = 5
}
 scanbotsdk_mrz_document_type_t enum More...
 
enum  scanbotsdk_mrz_incomplete_result_handling_t {
  SCANBOTSDK_MRZ_INCOMPLETE_RESULT_HANDLING_ACCEPT = 0 ,
  SCANBOTSDK_MRZ_INCOMPLETE_RESULT_HANDLING_REJECT = 1
}
 scanbotsdk_mrz_incomplete_result_handling_t enum More...
 

Functions

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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 

Detailed Description

Typedef Documentation

◆ scanbotsdk_mrz_document_type_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

◆ 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

◆ scanbotsdk_mrz_scanner_result_t

scanbotsdk_mrz_scanner_result_t class

Container for result of MRZ scanning attempt.

◆ scanbotsdk_mrz_scanner_t

scanbotsdk_mrz_scanner_t class

API for machine readable zone scanning.

Required licence feature(s): MrzScanner.

Enumeration Type Documentation

◆ scanbotsdk_mrz_document_type_t

scanbotsdk_mrz_document_type_t enum

Type of document containing the MRZ.

Enumerator
SCANBOTSDK_MRZ_DOCUMENT_TYPE_UNKNOWN 

Undefined.

SCANBOTSDK_MRZ_DOCUMENT_TYPE_CREW_MEMBER_CERTIFICATE 

Crew member certificate.

SCANBOTSDK_MRZ_DOCUMENT_TYPE_ID_CARD 

ID card.

SCANBOTSDK_MRZ_DOCUMENT_TYPE_PASSPORT 

Passport.

SCANBOTSDK_MRZ_DOCUMENT_TYPE_VISA 

Visa card.

SCANBOTSDK_MRZ_DOCUMENT_TYPE_CH_DRIVING_LICENSE 

Swiss driver license.

◆ 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).

Enumerator
SCANBOTSDK_MRZ_INCOMPLETE_RESULT_HANDLING_ACCEPT 

Accept incomplete results. Fields failing validation will have a validation status of INVALID. Typically used for single-shot scanning.

SCANBOTSDK_MRZ_INCOMPLETE_RESULT_HANDLING_REJECT 

Reject incomplete results. If any fields are missing or fail validation, the result document will be empty. Typically used for live scanning.

Function Documentation

◆ scanbotsdk_mrz_document_type_t_to_string()

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.

Parameters
valueThe value to be converted to string.
resultPointer to a variable that will store the string representation of the value.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_mrz_incomplete_result_handling_t_to_string()

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.

Parameters
valueThe value to be converted to string.
resultPointer to a variable that will store the string representation of the value.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_mrz_parser_configuration_create()

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.

Parameters
incomplete_result_handlingDefines how to handle incomplete MRZ results (e.g. caused by failed validation).

Default is ACCEPT

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_mrz_parser_configuration_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_parser_configuration_create_with_defaults()

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.

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_mrz_parser_configuration_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_parser_configuration_free()

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.

Parameters
objectPointer to the instance of scanbotsdk_mrz_parser_configuration_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_parser_configuration_get_incomplete_result_handling()

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

Parameters
selfPointer to the instance of scanbotsdk_mrz_parser_configuration_t
incomplete_result_handlingPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_mrz_parser_configuration_set_incomplete_result_handling()

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.

Parameters
selfPointer to the instance of scanbotsdk_mrz_parser_configuration_t, the field of which will be set
incomplete_result_handlingThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_parser_create()

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.

Parameters
configurationThe configuration to use for the parser. The value must not be null.
resultPointer to a variable that will store the created instance of scanbotsdk_mrz_parser_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_parser_free()

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.

Parameters
selfPointer to the instance of scanbotsdk_mrz_parser_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_parser_parse()

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.

Parameters
selfPointer to the instance of scanbotsdk_mrz_parser_t method to be called on
textThe MRZ string to parse. Should be formatted with newlines. The value must not be null.
resultPointer to a variable that will store the created instance of scanbotsdk_mrz_parser_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_scanner_clear_result()

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.

Parameters
selfPointer to the instance of scanbotsdk_mrz_scanner_t method to be called on
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_scanner_configuration_create()

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.

Parameters
frame_accumulation_configurationConfigure the frame accumulation process. The value must not be null.
enable_detectionEnable 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

Parameters
incomplete_result_handlingDefines how to handle incomplete MRZ results (e.g. caused by failed validation).

Default is REJECT

Parameters
return_cropsIf true, crops of the detected MRZ and its fields will be returned in the result.

Default is false

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_mrz_scanner_configuration_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_scanner_configuration_create_with_defaults()

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.

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_mrz_scanner_configuration_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_scanner_configuration_free()

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.

Parameters
objectPointer to the instance of scanbotsdk_mrz_scanner_configuration_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_scanner_configuration_get_enable_detection()

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

Parameters
selfPointer to the instance of scanbotsdk_mrz_scanner_configuration_t
enable_detectionPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_mrz_scanner_configuration_get_frame_accumulation_configuration()

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.

Parameters
selfPointer to the instance of scanbotsdk_mrz_scanner_configuration_t
frame_accumulation_configurationPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_mrz_scanner_configuration_get_incomplete_result_handling()

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

Parameters
selfPointer to the instance of scanbotsdk_mrz_scanner_configuration_t
incomplete_result_handlingPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_mrz_scanner_configuration_get_return_crops()

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

Parameters
selfPointer to the instance of scanbotsdk_mrz_scanner_configuration_t
return_cropsPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_mrz_scanner_configuration_set_enable_detection()

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.

Parameters
selfPointer to the instance of scanbotsdk_mrz_scanner_configuration_t, the field of which will be set
enable_detectionThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_scanner_configuration_set_frame_accumulation_configuration()

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.

Parameters
selfPointer to the instance of scanbotsdk_mrz_scanner_configuration_t, the field of which will be set
frame_accumulation_configurationThe value to be set. Must not be null.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_scanner_configuration_set_incomplete_result_handling()

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.

Parameters
selfPointer to the instance of scanbotsdk_mrz_scanner_configuration_t, the field of which will be set
incomplete_result_handlingThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_scanner_configuration_set_return_crops()

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.

Parameters
selfPointer to the instance of scanbotsdk_mrz_scanner_configuration_t, the field of which will be set
return_cropsThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_scanner_create()

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.

Parameters
configurationThe configuration to use for the scanner. The value must not be null.
resultPointer to a variable that will store the created instance of scanbotsdk_mrz_scanner_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_scanner_free()

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.

Parameters
selfPointer to the instance of scanbotsdk_mrz_scanner_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_scanner_result_free()

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.

Parameters
objectPointer to the instance of scanbotsdk_mrz_scanner_result_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_mrz_scanner_result_get_document()

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.

Parameters
selfPointer to the instance of scanbotsdk_mrz_scanner_result_t
documentPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_mrz_scanner_result_get_raw_mrz()

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.

Parameters
selfPointer to the instance of scanbotsdk_mrz_scanner_result_t
raw_mrzPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_mrz_scanner_result_get_success()

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

Parameters
selfPointer to the instance of scanbotsdk_mrz_scanner_result_t
successPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_mrz_scanner_run()

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.

Parameters
selfPointer to the instance of scanbotsdk_mrz_scanner_t method to be called on
imageThe image to recognize. The value must not be null.
resultPointer to a variable that will store the created instance of scanbotsdk_mrz_scanner_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered