Scanbot SDK
Loading...
Searching...
No Matches
Scanbot C SDK Frame accumulation

Typedefs

typedef enum scanbotsdk_confirmation_method_t scanbotsdk_confirmation_method_t
 scanbotsdk_confirmation_method_t enum
 
typedef struct scanbotsdk_result_accumulation_configuration_t scanbotsdk_result_accumulation_configuration_t
 scanbotsdk_result_accumulation_configuration_t class
 
typedef struct scanbotsdk_accumulated_results_verifier_configuration_t scanbotsdk_accumulated_results_verifier_configuration_t
 scanbotsdk_accumulated_results_verifier_configuration_t class
 

Enumerations

enum  scanbotsdk_confirmation_method_t {
  SCANBOTSDK_CONFIRMATION_METHOD_EXACT = 0 ,
  SCANBOTSDK_CONFIRMATION_METHOD_INTERPOLATE = 1
}
 scanbotsdk_confirmation_method_t enum More...
 

Functions

SBSDK_API scanbotsdk_error_code_t scanbotsdk_confirmation_method_t_to_string (scanbotsdk_confirmation_method_t value, const char **result)
 Returns the string representation of the given scanbotsdk_confirmation_method_t value.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_create (scanbotsdk_confirmation_method_t confirmation_method, int min_confirmations, double min_confidence_for_stable_field, int auto_clear_threshold, scanbotsdk_result_accumulation_configuration_t **result)
 Creates a new instance of scanbotsdk_result_accumulation_configuration with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_create_with_defaults (scanbotsdk_result_accumulation_configuration_t **result)
 Creates a new instance of scanbotsdk_result_accumulation_configuration_t with given required params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_free (scanbotsdk_result_accumulation_configuration_t *object)
 Frees the memory allocated for the instance of scanbotsdk_result_accumulation_configuration_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_get_confirmation_method (scanbotsdk_result_accumulation_configuration_t *self, scanbotsdk_confirmation_method_t *confirmation_method)
 Returns value of confirmation_method field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_set_confirmation_method (scanbotsdk_result_accumulation_configuration_t *self, scanbotsdk_confirmation_method_t confirmation_method)
 Sets value of confirmation_method field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_get_min_confirmations (scanbotsdk_result_accumulation_configuration_t *self, int *min_confirmations)
 Returns value of min_confirmations field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_set_min_confirmations (scanbotsdk_result_accumulation_configuration_t *self, int min_confirmations)
 Sets value of min_confirmations field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_get_min_confidence_for_stable_field (scanbotsdk_result_accumulation_configuration_t *self, double *min_confidence_for_stable_field)
 Returns value of min_confidence_for_stable_field field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_set_min_confidence_for_stable_field (scanbotsdk_result_accumulation_configuration_t *self, double min_confidence_for_stable_field)
 Sets value of min_confidence_for_stable_field field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_get_auto_clear_threshold (scanbotsdk_result_accumulation_configuration_t *self, int *auto_clear_threshold)
 Returns value of auto_clear_threshold field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_set_auto_clear_threshold (scanbotsdk_result_accumulation_configuration_t *self, int auto_clear_threshold)
 Sets value of auto_clear_threshold field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_accumulated_results_verifier_configuration_create (int maximum_number_of_accumulated_frames, int minimum_number_of_required_frames_with_equal_scanning_result, scanbotsdk_accumulated_results_verifier_configuration_t **result)
 Creates a new instance of scanbotsdk_accumulated_results_verifier_configuration with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_accumulated_results_verifier_configuration_create_with_defaults (scanbotsdk_accumulated_results_verifier_configuration_t **result)
 Creates a new instance of scanbotsdk_accumulated_results_verifier_configuration_t with given required params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_accumulated_results_verifier_configuration_free (scanbotsdk_accumulated_results_verifier_configuration_t *object)
 Frees the memory allocated for the instance of scanbotsdk_accumulated_results_verifier_configuration_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_accumulated_results_verifier_configuration_get_maximum_number_of_accumulated_frames (scanbotsdk_accumulated_results_verifier_configuration_t *self, int *maximum_number_of_accumulated_frames)
 Returns value of maximum_number_of_accumulated_frames field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_accumulated_results_verifier_configuration_set_maximum_number_of_accumulated_frames (scanbotsdk_accumulated_results_verifier_configuration_t *self, int maximum_number_of_accumulated_frames)
 Sets value of maximum_number_of_accumulated_frames field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_accumulated_results_verifier_configuration_get_minimum_number_of_required_frames_with_equal_scanning_result (scanbotsdk_accumulated_results_verifier_configuration_t *self, int *minimum_number_of_required_frames_with_equal_scanning_result)
 Returns value of minimum_number_of_required_frames_with_equal_scanning_result field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_accumulated_results_verifier_configuration_set_minimum_number_of_required_frames_with_equal_scanning_result (scanbotsdk_accumulated_results_verifier_configuration_t *self, int minimum_number_of_required_frames_with_equal_scanning_result)
 Sets value of minimum_number_of_required_frames_with_equal_scanning_result field of the given object.
 

Detailed Description

Typedef Documentation

◆ scanbotsdk_accumulated_results_verifier_configuration_t

◆ scanbotsdk_confirmation_method_t

◆ scanbotsdk_result_accumulation_configuration_t

Enumeration Type Documentation

◆ scanbotsdk_confirmation_method_t

scanbotsdk_confirmation_method_t enum

Method used to confirm a result.

Enumerator
SCANBOTSDK_CONFIRMATION_METHOD_EXACT 

Require seeing the same result multiple times to confirm it. E.g. if the seen values are "John B. Doe", "John B.", "B. Doe", "John B. Doe" then the confirmation count for the value "John B. Doe" is 2 and for the rest it's 1. A field's value is considered CONFIRMED if its confirmation count is greater or equal to minConfirmations.

SCANBOTSDK_CONFIRMATION_METHOD_INTERPOLATE 

Interpolate between seen values to generate the most likely true value. E.g. if the seen values are "John X. Doe", "John B.", "B. Doe" then the most likely true value can be interpolated to be "John B. Doe". The interpolated value is considered CONFIRMED if each character in it has been seen at least minConfirmations times.

Function Documentation

◆ scanbotsdk_accumulated_results_verifier_configuration_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_accumulated_results_verifier_configuration_create ( int maximum_number_of_accumulated_frames,
int minimum_number_of_required_frames_with_equal_scanning_result,
scanbotsdk_accumulated_results_verifier_configuration_t ** result )

Creates a new instance of scanbotsdk_accumulated_results_verifier_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
maximum_number_of_accumulated_framesMaximum number of accumulated frames to inspect to verify a scan result.

Default is 3

Parameters
minimum_number_of_required_frames_with_equal_scanning_resultMinimum number of accumulated frames that have an equal result in order for the result to be considered verified.

Default is 2

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

◆ scanbotsdk_accumulated_results_verifier_configuration_create_with_defaults()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_accumulated_results_verifier_configuration_create_with_defaults ( scanbotsdk_accumulated_results_verifier_configuration_t ** result)

Creates a new instance of scanbotsdk_accumulated_results_verifier_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_accumulated_results_verifier_configuration_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_accumulated_results_verifier_configuration_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_accumulated_results_verifier_configuration_free ( scanbotsdk_accumulated_results_verifier_configuration_t * object)

Frees the memory allocated for the instance of scanbotsdk_accumulated_results_verifier_configuration_t. If null is passed, the function does nothing.

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

◆ scanbotsdk_accumulated_results_verifier_configuration_get_maximum_number_of_accumulated_frames()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_accumulated_results_verifier_configuration_get_maximum_number_of_accumulated_frames ( scanbotsdk_accumulated_results_verifier_configuration_t * self,
int * maximum_number_of_accumulated_frames )

Returns value of maximum_number_of_accumulated_frames field of the given object.

Maximum number of accumulated frames to inspect to verify a scan result.

Default is 3

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

◆ scanbotsdk_accumulated_results_verifier_configuration_get_minimum_number_of_required_frames_with_equal_scanning_result()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_accumulated_results_verifier_configuration_get_minimum_number_of_required_frames_with_equal_scanning_result ( scanbotsdk_accumulated_results_verifier_configuration_t * self,
int * minimum_number_of_required_frames_with_equal_scanning_result )

Returns value of minimum_number_of_required_frames_with_equal_scanning_result field of the given object.

Minimum number of accumulated frames that have an equal result in order for the result to be considered verified.

Default is 2

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

◆ scanbotsdk_accumulated_results_verifier_configuration_set_maximum_number_of_accumulated_frames()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_accumulated_results_verifier_configuration_set_maximum_number_of_accumulated_frames ( scanbotsdk_accumulated_results_verifier_configuration_t * self,
int maximum_number_of_accumulated_frames )

Sets value of maximum_number_of_accumulated_frames field of the given object.

Maximum number of accumulated frames to inspect to verify a scan result.

Default is 3

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_accumulated_results_verifier_configuration_t, the field of which will be set
maximum_number_of_accumulated_framesThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_accumulated_results_verifier_configuration_set_minimum_number_of_required_frames_with_equal_scanning_result()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_accumulated_results_verifier_configuration_set_minimum_number_of_required_frames_with_equal_scanning_result ( scanbotsdk_accumulated_results_verifier_configuration_t * self,
int minimum_number_of_required_frames_with_equal_scanning_result )

Sets value of minimum_number_of_required_frames_with_equal_scanning_result field of the given object.

Minimum number of accumulated frames that have an equal result in order for the result to be considered verified.

Default is 2

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_accumulated_results_verifier_configuration_t, the field of which will be set
minimum_number_of_required_frames_with_equal_scanning_resultThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_confirmation_method_t_to_string()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_confirmation_method_t_to_string ( scanbotsdk_confirmation_method_t value,
const char ** result )

Returns the string representation of the given scanbotsdk_confirmation_method_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_result_accumulation_configuration_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_create ( scanbotsdk_confirmation_method_t confirmation_method,
int min_confirmations,
double min_confidence_for_stable_field,
int auto_clear_threshold,
scanbotsdk_result_accumulation_configuration_t ** result )

Creates a new instance of scanbotsdk_result_accumulation_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
confirmation_methodMethod used to confirm a result.

Default is EXACT

Parameters
min_confirmationsNumber of confirmations required to consider a result confirmed (see ConfirmationMethod). Requiring more confirmations will increase the reliability of the result but also the time to gather enough confirmations.

Default is 3

Parameters
min_confidence_for_stable_fieldMinimum confidence required to consider a field confirmed.

Default is 0.8

Parameters
auto_clear_thresholdWill auto-clear the cache if this number of frames have been a different document type or empty.

Default is 4

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

◆ scanbotsdk_result_accumulation_configuration_create_with_defaults()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_create_with_defaults ( scanbotsdk_result_accumulation_configuration_t ** result)

Creates a new instance of scanbotsdk_result_accumulation_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_result_accumulation_configuration_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_result_accumulation_configuration_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_free ( scanbotsdk_result_accumulation_configuration_t * object)

Frees the memory allocated for the instance of scanbotsdk_result_accumulation_configuration_t. If null is passed, the function does nothing.

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

◆ scanbotsdk_result_accumulation_configuration_get_auto_clear_threshold()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_get_auto_clear_threshold ( scanbotsdk_result_accumulation_configuration_t * self,
int * auto_clear_threshold )

Returns value of auto_clear_threshold field of the given object.

Will auto-clear the cache if this number of frames have been a different document type or empty.

Default is 4

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

◆ scanbotsdk_result_accumulation_configuration_get_confirmation_method()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_get_confirmation_method ( scanbotsdk_result_accumulation_configuration_t * self,
scanbotsdk_confirmation_method_t * confirmation_method )

Returns value of confirmation_method field of the given object.

Method used to confirm a result.

Default is EXACT

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

◆ scanbotsdk_result_accumulation_configuration_get_min_confidence_for_stable_field()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_get_min_confidence_for_stable_field ( scanbotsdk_result_accumulation_configuration_t * self,
double * min_confidence_for_stable_field )

Returns value of min_confidence_for_stable_field field of the given object.

Minimum confidence required to consider a field confirmed.

Default is 0.8

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

◆ scanbotsdk_result_accumulation_configuration_get_min_confirmations()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_get_min_confirmations ( scanbotsdk_result_accumulation_configuration_t * self,
int * min_confirmations )

Returns value of min_confirmations field of the given object.

Number of confirmations required to consider a result confirmed (see ConfirmationMethod). Requiring more confirmations will increase the reliability of the result but also the time to gather enough confirmations.

Default is 3

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

◆ scanbotsdk_result_accumulation_configuration_set_auto_clear_threshold()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_set_auto_clear_threshold ( scanbotsdk_result_accumulation_configuration_t * self,
int auto_clear_threshold )

Sets value of auto_clear_threshold field of the given object.

Will auto-clear the cache if this number of frames have been a different document type or empty.

Default is 4

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_result_accumulation_configuration_t, the field of which will be set
auto_clear_thresholdThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_result_accumulation_configuration_set_confirmation_method()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_set_confirmation_method ( scanbotsdk_result_accumulation_configuration_t * self,
scanbotsdk_confirmation_method_t confirmation_method )

Sets value of confirmation_method field of the given object.

Method used to confirm a result.

Default is EXACT

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_result_accumulation_configuration_t, the field of which will be set
confirmation_methodThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_result_accumulation_configuration_set_min_confidence_for_stable_field()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_set_min_confidence_for_stable_field ( scanbotsdk_result_accumulation_configuration_t * self,
double min_confidence_for_stable_field )

Sets value of min_confidence_for_stable_field field of the given object.

Minimum confidence required to consider a field confirmed.

Default is 0.8

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_result_accumulation_configuration_t, the field of which will be set
min_confidence_for_stable_fieldThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_result_accumulation_configuration_set_min_confirmations()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_result_accumulation_configuration_set_min_confirmations ( scanbotsdk_result_accumulation_configuration_t * self,
int min_confirmations )

Sets value of min_confirmations field of the given object.

Number of confirmations required to consider a result confirmed (see ConfirmationMethod). Requiring more confirmations will increase the reliability of the result but also the time to gather enough confirmations.

Default is 3

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_result_accumulation_configuration_t, the field of which will be set
min_confirmationsThe value to be set.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered