API Reference
get_deviceid
Name
get_device_id
Description
Retrieves the Hardware ID from a library.
Input
None
Output
The Hardware ID is returned as a standard Python string.
set_activation
Name
set_activation
Description
Activates the OCR engine using the provided license key.
Input
license_key (str): License key string, this should be encoded as UTF-8.
Output
A JSON-formatted string containing the result of the activation
Typically includes an "errorCode" field indicating the status of the activation.
0: Success
Non-zero: Activation failed
init_sdk
Name
init_sdk
Description
Initializes the OCR engine with the required dictionary files.
Input
dict_path (str): Path to the engine binary files directory, This path must be provided as a UTF-8 encoded string.
Output
A JSON-formatted string containing the result of the initialization. Typically includes an "errorCode" field indicating the status of the initialization.
0: Success
Non-zero: Initialization failed
ocr_id_card
Name
ocr_id_card
Description
Extracts data from ID card
Input
file_path1 (str): The path to the front image file.
file_path2 (str): The path to the back image file.
Output
A JSON-formatted string containing the OCR results.
Example of ID OCR results
ocr_credit_card
Name
ocr_credit_card
Description
Etracts data from credit card
Input
file_path (str): The path to the credit card image file.
Output
A JSON-formatted string containing the OCR results.
ocr_barcode
Name
ocr_barcode
Description
Etracts data from barcode
Input
file_path (str): The path to the barcode image file.
Output
A JSON-formatted string containing the OCR results.
Last updated