Scanbot SDK
Loading...
Searching...
No Matches
Scanbot C SDK Credit card

Typedefs

typedef struct scanbotsdk_credit_card_scanner_t scanbotsdk_credit_card_scanner_t
 scanbotsdk_credit_card_scanner_t class
 
typedef enum scanbotsdk_credit_card_scanning_status_t scanbotsdk_credit_card_scanning_status_t
 scanbotsdk_credit_card_scanning_status_t enum
 
typedef struct scanbotsdk_credit_card_scanning_result_t scanbotsdk_credit_card_scanning_result_t
 scanbotsdk_credit_card_scanning_result_t class
 
typedef struct scanbotsdk_credit_card_scanner_configuration_t scanbotsdk_credit_card_scanner_configuration_t
 scanbotsdk_credit_card_scanner_configuration_t class
 

Enumerations

enum  scanbotsdk_credit_card_scanning_status_t {
  SCANBOTSDK_CREDIT_CARD_SCANNING_STATUS_SUCCESS = 0 ,
  SCANBOTSDK_CREDIT_CARD_SCANNING_STATUS_ERROR_NOTHING_FOUND = 1 ,
  SCANBOTSDK_CREDIT_CARD_SCANNING_STATUS_INCOMPLETE = 2
}
 scanbotsdk_credit_card_scanning_status_t enum More...
 

Functions

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_create (scanbotsdk_credit_card_scanner_configuration_t *configuration, scanbotsdk_credit_card_scanner_t **result)
 Creates a new instance of scanbotsdk_credit_card_scanner with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_free (scanbotsdk_credit_card_scanner_t *self)
 Frees the memory allocated for the instance of scanbotsdk_credit_card_scanner_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_run (scanbotsdk_credit_card_scanner_t *self, scanbotsdk_image_t *image, scanbotsdk_credit_card_scanning_result_t **result)
 Scan the credit card in the given image.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_clear_result (scanbotsdk_credit_card_scanner_t *self)
 Clears the accumulated results. Should be called after a document has been scanned to the customers satisfaction to prevent a poisoned cache.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanning_status_t_to_string (scanbotsdk_credit_card_scanning_status_t value, const char **result)
 Returns the string representation of the given scanbotsdk_credit_card_scanning_status_t value.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanning_result_free (scanbotsdk_credit_card_scanning_result_t *object)
 Frees the memory allocated for the instance of scanbotsdk_credit_card_scanning_result_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanning_result_get_detection_status (scanbotsdk_credit_card_scanning_result_t *self, scanbotsdk_document_detection_status_t *detection_status)
 Returns value of detection_status field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanning_result_get_scanning_status (scanbotsdk_credit_card_scanning_result_t *self, scanbotsdk_credit_card_scanning_status_t *scanning_status)
 Returns value of scanning_status field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanning_result_get_credit_card (scanbotsdk_credit_card_scanning_result_t *self, scanbotsdk_generic_document_t **credit_card)
 Returns value of credit_card 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_credit_card_scanning_result_get_quad (scanbotsdk_credit_card_scanning_result_t *self, scanbotsdk_point_t **quad)
 Returns value of quad field of the given object. The returned value is direct view into memory, no pre-allocations needed.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanning_result_get_quad_size (scanbotsdk_credit_card_scanning_result_t *self, size_t *size)
 Returns size of quad array.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanning_result_get_quad_normalized (scanbotsdk_credit_card_scanning_result_t *self, scanbotsdk_pointf_t **quad_normalized)
 Returns value of quad_normalized field of the given object. The returned value is direct view into memory, no pre-allocations needed.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanning_result_get_quad_normalized_size (scanbotsdk_credit_card_scanning_result_t *self, size_t *size)
 Returns size of quad_normalized array.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_create (bool use_document_detector, bool require_expiry_date, bool require_cardholder_name, scanbotsdk_result_accumulation_configuration_t *result_accumulation_config, bool return_credit_card_image, scanbotsdk_processing_mode_t processing_mode, scanbotsdk_credit_card_scanner_configuration_t **result)
 Creates a new instance of scanbotsdk_credit_card_scanner_configuration with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_create_with_defaults (scanbotsdk_credit_card_scanner_configuration_t **result)
 Creates a new instance of scanbotsdk_credit_card_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_credit_card_scanner_configuration_free (scanbotsdk_credit_card_scanner_configuration_t *object)
 Frees the memory allocated for the instance of scanbotsdk_credit_card_scanner_configuration_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_get_use_document_detector (scanbotsdk_credit_card_scanner_configuration_t *self, bool *use_document_detector)
 Returns value of use_document_detector field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_set_use_document_detector (scanbotsdk_credit_card_scanner_configuration_t *self, bool use_document_detector)
 Sets value of use_document_detector field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_get_require_expiry_date (scanbotsdk_credit_card_scanner_configuration_t *self, bool *require_expiry_date)
 Returns value of require_expiry_date field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_set_require_expiry_date (scanbotsdk_credit_card_scanner_configuration_t *self, bool require_expiry_date)
 Sets value of require_expiry_date field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_get_require_cardholder_name (scanbotsdk_credit_card_scanner_configuration_t *self, bool *require_cardholder_name)
 Returns value of require_cardholder_name field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_set_require_cardholder_name (scanbotsdk_credit_card_scanner_configuration_t *self, bool require_cardholder_name)
 Sets value of require_cardholder_name field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_get_result_accumulation_config (scanbotsdk_credit_card_scanner_configuration_t *self, scanbotsdk_result_accumulation_configuration_t **result_accumulation_config)
 Returns value of result_accumulation_config 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_credit_card_scanner_configuration_set_result_accumulation_config (scanbotsdk_credit_card_scanner_configuration_t *self, scanbotsdk_result_accumulation_configuration_t *result_accumulation_config)
 Sets value of result_accumulation_config field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_get_return_credit_card_image (scanbotsdk_credit_card_scanner_configuration_t *self, bool *return_credit_card_image)
 Returns value of return_credit_card_image field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_set_return_credit_card_image (scanbotsdk_credit_card_scanner_configuration_t *self, bool return_credit_card_image)
 Sets value of return_credit_card_image field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_get_processing_mode (scanbotsdk_credit_card_scanner_configuration_t *self, scanbotsdk_processing_mode_t *processing_mode)
 Returns value of processing_mode field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_set_processing_mode (scanbotsdk_credit_card_scanner_configuration_t *self, scanbotsdk_processing_mode_t processing_mode)
 Sets value of processing_mode field of the given object.
 

Detailed Description

Typedef Documentation

◆ scanbotsdk_credit_card_scanner_configuration_t

◆ scanbotsdk_credit_card_scanner_t

scanbotsdk_credit_card_scanner_t class

API for credit card scanning.

Required licence feature(s): CreditCardScanner.

◆ scanbotsdk_credit_card_scanning_result_t

scanbotsdk_credit_card_scanning_result_t class

Contains the result of running the credit card scanner.

◆ scanbotsdk_credit_card_scanning_status_t

Enumeration Type Documentation

◆ scanbotsdk_credit_card_scanning_status_t

scanbotsdk_credit_card_scanning_status_t enum

The status of the scanning process.

Enumerator
SCANBOTSDK_CREDIT_CARD_SCANNING_STATUS_SUCCESS 

The credit card was scanned successfully.

SCANBOTSDK_CREDIT_CARD_SCANNING_STATUS_ERROR_NOTHING_FOUND 

No credit card was detected.

SCANBOTSDK_CREDIT_CARD_SCANNING_STATUS_INCOMPLETE 

Not all required fields were found or confirmed.

Function Documentation

◆ scanbotsdk_credit_card_scanner_clear_result()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_clear_result ( scanbotsdk_credit_card_scanner_t * self)

Clears the accumulated results. Should be called after a document has been scanned 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_credit_card_scanner_t method to be called on
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_credit_card_scanner_configuration_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_create ( bool use_document_detector,
bool require_expiry_date,
bool require_cardholder_name,
scanbotsdk_result_accumulation_configuration_t * result_accumulation_config,
bool return_credit_card_image,
scanbotsdk_processing_mode_t processing_mode,
scanbotsdk_credit_card_scanner_configuration_t ** result )

Creates a new instance of scanbotsdk_credit_card_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
use_document_detectorIf true, the document detector will be used to find where the credit card is in the input image. If false, the scanner will assume that the credit card has been pre-cropped and takes the entirety of the input image.

Default is true

Parameters
require_expiry_dateWhether the expiry date is required for a successful scan.

Default is true

Parameters
require_cardholder_nameWhether the cardholder name is required for a successful scan.

Default is true

Parameters
result_accumulation_configConfiguration for how to accumulate results. The value must not be null.
return_credit_card_imageIf true, the credit card image will be returned in creditCard field of CreditCardScanningResult.

Default is false

Parameters
processing_modeScanners typically can produce better results from a single image if they are allowed to spend a longer time analyzing it.

On the other hand, scanners can produce even better results if they can analyze multiple images of the same subject and cross-check and combine the results. The processing mode tells the scanner whether to optimize for single or multiple images of a subject.

Default is AUTO

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

◆ scanbotsdk_credit_card_scanner_configuration_create_with_defaults()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_create_with_defaults ( scanbotsdk_credit_card_scanner_configuration_t ** result)

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

◆ scanbotsdk_credit_card_scanner_configuration_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_free ( scanbotsdk_credit_card_scanner_configuration_t * object)

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

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

◆ scanbotsdk_credit_card_scanner_configuration_get_processing_mode()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_get_processing_mode ( scanbotsdk_credit_card_scanner_configuration_t * self,
scanbotsdk_processing_mode_t * processing_mode )

Returns value of processing_mode field of the given object.

Scanners typically can produce better results from a single image if they are allowed to spend a longer time analyzing it.

On the other hand, scanners can produce even better results if they can analyze multiple images of the same subject and cross-check and combine the results. The processing mode tells the scanner whether to optimize for single or multiple images of a subject.

Default is AUTO

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

◆ scanbotsdk_credit_card_scanner_configuration_get_require_cardholder_name()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_get_require_cardholder_name ( scanbotsdk_credit_card_scanner_configuration_t * self,
bool * require_cardholder_name )

Returns value of require_cardholder_name field of the given object.

Whether the cardholder name is required for a successful scan.

Default is true

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

◆ scanbotsdk_credit_card_scanner_configuration_get_require_expiry_date()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_get_require_expiry_date ( scanbotsdk_credit_card_scanner_configuration_t * self,
bool * require_expiry_date )

Returns value of require_expiry_date field of the given object.

Whether the expiry date is required for a successful scan.

Default is true

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

◆ scanbotsdk_credit_card_scanner_configuration_get_result_accumulation_config()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_get_result_accumulation_config ( scanbotsdk_credit_card_scanner_configuration_t * self,
scanbotsdk_result_accumulation_configuration_t ** result_accumulation_config )

Returns value of result_accumulation_config field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.

Configuration for how to accumulate results.

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

◆ scanbotsdk_credit_card_scanner_configuration_get_return_credit_card_image()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_get_return_credit_card_image ( scanbotsdk_credit_card_scanner_configuration_t * self,
bool * return_credit_card_image )

Returns value of return_credit_card_image field of the given object.

If true, the credit card image will be returned in creditCard field of CreditCardScanningResult.

Default is false

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

◆ scanbotsdk_credit_card_scanner_configuration_get_use_document_detector()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_get_use_document_detector ( scanbotsdk_credit_card_scanner_configuration_t * self,
bool * use_document_detector )

Returns value of use_document_detector field of the given object.

If true, the document detector will be used to find where the credit card is in the input image. If false, the scanner will assume that the credit card has been pre-cropped and takes the entirety of the input image.

Default is true

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

◆ scanbotsdk_credit_card_scanner_configuration_set_processing_mode()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_set_processing_mode ( scanbotsdk_credit_card_scanner_configuration_t * self,
scanbotsdk_processing_mode_t processing_mode )

Sets value of processing_mode field of the given object.

Scanners typically can produce better results from a single image if they are allowed to spend a longer time analyzing it.

On the other hand, scanners can produce even better results if they can analyze multiple images of the same subject and cross-check and combine the results. The processing mode tells the scanner whether to optimize for single or multiple images of a subject.

Default is AUTO

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

◆ scanbotsdk_credit_card_scanner_configuration_set_require_cardholder_name()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_set_require_cardholder_name ( scanbotsdk_credit_card_scanner_configuration_t * self,
bool require_cardholder_name )

Sets value of require_cardholder_name field of the given object.

Whether the cardholder name is required for a successful scan.

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

◆ scanbotsdk_credit_card_scanner_configuration_set_require_expiry_date()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_set_require_expiry_date ( scanbotsdk_credit_card_scanner_configuration_t * self,
bool require_expiry_date )

Sets value of require_expiry_date field of the given object.

Whether the expiry date is required for a successful scan.

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

◆ scanbotsdk_credit_card_scanner_configuration_set_result_accumulation_config()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_set_result_accumulation_config ( scanbotsdk_credit_card_scanner_configuration_t * self,
scanbotsdk_result_accumulation_configuration_t * result_accumulation_config )

Sets value of result_accumulation_config field of the given object.

Configuration for how to accumulate results.

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

◆ scanbotsdk_credit_card_scanner_configuration_set_return_credit_card_image()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_set_return_credit_card_image ( scanbotsdk_credit_card_scanner_configuration_t * self,
bool return_credit_card_image )

Sets value of return_credit_card_image field of the given object.

If true, the credit card image will be returned in creditCard field of CreditCardScanningResult.

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

◆ scanbotsdk_credit_card_scanner_configuration_set_use_document_detector()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_configuration_set_use_document_detector ( scanbotsdk_credit_card_scanner_configuration_t * self,
bool use_document_detector )

Sets value of use_document_detector field of the given object.

If true, the document detector will be used to find where the credit card is in the input image. If false, the scanner will assume that the credit card has been pre-cropped and takes the entirety of the input image.

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

◆ scanbotsdk_credit_card_scanner_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_create ( scanbotsdk_credit_card_scanner_configuration_t * configuration,
scanbotsdk_credit_card_scanner_t ** result )

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

◆ scanbotsdk_credit_card_scanner_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_free ( scanbotsdk_credit_card_scanner_t * self)

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

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

◆ scanbotsdk_credit_card_scanner_run()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanner_run ( scanbotsdk_credit_card_scanner_t * self,
scanbotsdk_image_t * image,
scanbotsdk_credit_card_scanning_result_t ** result )

Scan the credit card 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_credit_card_scanner_t method to be called on
imageThe image to scan. The value must not be null.
resultPointer to a variable that will store the created instance of scanbotsdk_credit_card_scanner_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_credit_card_scanning_result_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanning_result_free ( scanbotsdk_credit_card_scanning_result_t * object)

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

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

◆ scanbotsdk_credit_card_scanning_result_get_credit_card()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanning_result_get_credit_card ( scanbotsdk_credit_card_scanning_result_t * self,
scanbotsdk_generic_document_t ** credit_card )

Returns value of credit_card field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.

Generic document containing credit card data. Not present, if status is FAIL.

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

◆ scanbotsdk_credit_card_scanning_result_get_detection_status()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanning_result_get_detection_status ( scanbotsdk_credit_card_scanning_result_t * self,
scanbotsdk_document_detection_status_t * detection_status )

Returns value of detection_status field of the given object.

The status of the credit card detection step.

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

◆ scanbotsdk_credit_card_scanning_result_get_quad()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanning_result_get_quad ( scanbotsdk_credit_card_scanning_result_t * self,
scanbotsdk_point_t ** quad )

Returns value of quad field of the given object. The returned value is direct view into memory, no pre-allocations needed.

Coordinates of the detected credit card in the input image (clockwise from top-left).

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

◆ scanbotsdk_credit_card_scanning_result_get_quad_normalized()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanning_result_get_quad_normalized ( scanbotsdk_credit_card_scanning_result_t * self,
scanbotsdk_pointf_t ** quad_normalized )

Returns value of quad_normalized field of the given object. The returned value is direct view into memory, no pre-allocations needed.

Coordinates of the detected credit card in the input image (clockwise from top-left), normalized to the range [0, 1].

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

◆ scanbotsdk_credit_card_scanning_result_get_quad_normalized_size()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanning_result_get_quad_normalized_size ( scanbotsdk_credit_card_scanning_result_t * self,
size_t * size )

Returns size of quad_normalized array.

Parameters
selfPointer to the instance of scanbotsdk_credit_card_scanning_result_t
sizePointer to a variable that will store the size.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_credit_card_scanning_result_get_quad_size()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanning_result_get_quad_size ( scanbotsdk_credit_card_scanning_result_t * self,
size_t * size )

Returns size of quad array.

Parameters
selfPointer to the instance of scanbotsdk_credit_card_scanning_result_t
sizePointer to a variable that will store the size.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_credit_card_scanning_result_get_scanning_status()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanning_result_get_scanning_status ( scanbotsdk_credit_card_scanning_result_t * self,
scanbotsdk_credit_card_scanning_status_t * scanning_status )

Returns value of scanning_status field of the given object.

The status of the credit card scanning step.

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

◆ scanbotsdk_credit_card_scanning_status_t_to_string()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_credit_card_scanning_status_t_to_string ( scanbotsdk_credit_card_scanning_status_t value,
const char ** result )

Returns the string representation of the given scanbotsdk_credit_card_scanning_status_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.