Scanbot SDK
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions
ScanbotSDK.h File Reference

The Scanbot SDK C API. More...

Go to the source code of this file.

Classes

struct  scanbotsdk_barcode_recognizer_init_params_t
 Barcode recognizer initialization parameters. More...
 
struct  scanbotsdk_image_t
 Wrapper for image data. More...
 
struct  scanbotsdk_init_params_t
 

Typedefs

typedef enum scanbotsdk_error_code_t scanbotsdk_error_code_t
 The error codes returned by most of the Scanbot SDK functions.
 
typedef enum scanbotsdk_license_status_t scanbotsdk_license_status_t
 The status of the license.
 
typedef enum scanbotsdk_barcode_format_t scanbotsdk_barcode_format_t
 Barcode format, also called symbology.
 
typedef enum scanbotsdk_barcode_engine_mode_t scanbotsdk_barcode_engine_mode_t
 Barcode recognition engine modes.
 
typedef struct scanbotsdk_barcode_recognizer_init_params_t scanbotsdk_barcode_recognizer_init_params_t
 Barcode recognizer initialization parameters.
 
typedef struct scanbotsdk_image_t scanbotsdk_image_t
 Wrapper for image data.
 
typedef struct scanbotsdk_barcode_recognizer_t scanbotsdk_barcode_recognizer_t
 Represents an instance of the barcode recognizer.
 
typedef struct scanbotsdk_barcode_result_t scanbotsdk_barcode_result_t
 Represents the result of a call to scanbotsdk_barcode_recognizer_recognize.
 
typedef struct scanbotsdk_init_params_t scanbotsdk_init_params_t
 

Enumerations

enum  scanbotsdk_error_code_t {
  SCANBOTSDK_OK = 0 ,
  SCANBOTSDK_ERROR ,
  SCANBOTSDK_ERROR_INVALID_LICENSE_STATUS ,
  SCANBOTSDK_ERROR_NULL_POINTER ,
  SCANBOTSDK_ERROR_INVALID_ARGUMENT ,
  SCANBOTSDK_ERROR_INVALID_IMAGE
}
 The error codes returned by most of the Scanbot SDK functions. More...
 
enum  scanbotsdk_license_status_t {
  SCANBOTSDK_LICENSE_STATUS_OK = 0 ,
  SCANBOTSDK_LICENSE_STATUS_FAILURE_CORRUPTED ,
  SCANBOTSDK_LICENSE_STATUS_FAILURE_WRONG_OS ,
  SCANBOTSDK_LICENSE_STATUS_FAILURE_APP_ID_MISMATCH ,
  SCANBOTSDK_LICENSE_STATUS_FAILURE_EXPIRED ,
  SCANBOTSDK_LICENSE_STATUS_FAILURE_UNKNOWN
}
 The status of the license. More...
 
enum  scanbotsdk_barcode_format_t {
  SCANBOTSDK_BARCODE_FORMAT_UNKNOWN = 0 ,
  SCANBOTSDK_BARCODE_FORMAT_AZTEC ,
  SCANBOTSDK_BARCODE_FORMAT_CODABAR ,
  SCANBOTSDK_BARCODE_FORMAT_CODE_39 ,
  SCANBOTSDK_BARCODE_FORMAT_CODE_93 ,
  SCANBOTSDK_BARCODE_FORMAT_CODE_128 ,
  SCANBOTSDK_BARCODE_FORMAT_DATA_MATRIX ,
  SCANBOTSDK_BARCODE_FORMAT_EAN_8 ,
  SCANBOTSDK_BARCODE_FORMAT_EAN_13 ,
  SCANBOTSDK_BARCODE_FORMAT_ITF ,
  SCANBOTSDK_BARCODE_FORMAT_PDF_417 ,
  SCANBOTSDK_BARCODE_FORMAT_QR_CODE ,
  SCANBOTSDK_BARCODE_FORMAT_RSS_14 ,
  SCANBOTSDK_BARCODE_FORMAT_RSS_EXPANDED ,
  SCANBOTSDK_BARCODE_FORMAT_UPC_A ,
  SCANBOTSDK_BARCODE_FORMAT_UPC_E ,
  SCANBOTSDK_BARCODE_FORMAT_UPC_EAN_EXTENSION ,
  SCANBOTSDK_BARCODE_FORMAT_MSI_PLESSEY ,
  SCANBOTSDK_BARCODE_FORMAT_IATA_2_OF_5 ,
  SCANBOTSDK_BARCODE_FORMAT_INDUSTRIAL_2_OF_5 ,
  SCANBOTSDK_BARCODE_FORMAT_ONE_D
}
 Barcode format, also called symbology. More...
 
enum  scanbotsdk_barcode_engine_mode_t {
  SCANBOTSDK_BARCODE_ENGINE_MODE_LEGACY_FAST = 0 ,
  SCANBOTSDK_BARCODE_ENGINE_MODE_FASTEST ,
  SCANBOTSDK_BARCODE_ENGINE_MODE_FAST ,
  SCANBOTSDK_BARCODE_ENGINE_MODE_BALANCED ,
  SCANBOTSDK_BARCODE_ENGINE_MODE_BEST
}
 Barcode recognition engine modes. More...
 

Functions

SBSDK_API const char * scanbotsdk_get_git_version ()
 Returns the git version of the Scanbot SDK as a null-terminated string.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_initialize (const scanbotsdk_init_params_t *init_params)
 Initialize the Scanbot SDK. You must always call this function before using any other Scanbot SDK functions.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_get_license_status (scanbotsdk_license_status_t *status)
 Returns the current license status.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_set_logging (bool enable)
 Enable or disable logging.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_set_log_handler (void(*log_handler)(const char *message))
 Sets the log handler.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_reset_log_handler ()
 Resets any previously set log handler.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_log_error (const char *message)
 Logs an error message using the Scanbot SDK logger.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_barcode_recognizer_create (const scanbotsdk_barcode_recognizer_init_params_t *params, scanbotsdk_barcode_recognizer_t **recognizer)
 Creates a new instance of the barcode recognizer.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_barcode_recognizer_free (scanbotsdk_barcode_recognizer_t *recognizer)
 Destroys the barcode recognizer instance.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_barcode_recognizer_recognize (scanbotsdk_barcode_recognizer_t *recognizer, const scanbotsdk_image_t *input, scanbotsdk_barcode_result_t **result)
 Recognize barcodes in an image.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_barcode_result_free (scanbotsdk_barcode_result_t *result)
 Destroys the barcode result instance.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_barcode_result_get_count (const scanbotsdk_barcode_result_t *result, int *count)
 Returns the count of detected barcodes in a result.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_barcode_result_get_format (const scanbotsdk_barcode_result_t *result, int index, scanbotsdk_barcode_format_t *format)
 Returns the barcode format of a the given barcode in a result.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_barcode_result_get_text (const scanbotsdk_barcode_result_t *result, int index, const char **text)
 Returns the barcode text as a null-terminated UTF8-encoded string of the given barcode in a result.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_barcode_result_get_quad (const scanbotsdk_barcode_result_t *result, int barcode_index, int *quad)
 Returns the coordinates in pixel space of the four corners of a given barcode in the result.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_barcode_result_get_raw_bytes (const scanbotsdk_barcode_result_t *result, int index, const unsigned char **raw_bytes, int *length)
 Returns the raw bytes of a given barcode from the result.
 

Detailed Description

The Scanbot SDK C API.

Enumeration Type Documentation

◆ scanbotsdk_error_code_t

The error codes returned by most of the Scanbot SDK functions.

Enumerator
SCANBOTSDK_OK 

No error

SCANBOTSDK_ERROR 

An error has occurred

SCANBOTSDK_ERROR_INVALID_LICENSE_STATUS 

There is no installed license, the license is invalid, no longer valid or does not cover the current OS or operation. Check the license status for more details by calling scanbotsdk_get_license_status.

SCANBOTSDK_ERROR_NULL_POINTER 

A null pointer was passed to a function

SCANBOTSDK_ERROR_INVALID_ARGUMENT 

An invalid argument was passed to a function

SCANBOTSDK_ERROR_INVALID_IMAGE 

An invalid image was passed to a function