API Documentation (C language)
API Documentation
Enum: StatusCode
Good
(0): The program is running normally.NotStarted
(1): The program has not been started. Call start_service
to start recognition.NotRegister
(2): The SDK is not registered. Call register
to activate.AuthorizationExpired
(3): The trial activation has expired. Please reactivate.NotModelLoaded
(5): The model has not been loaded.CameraImageNotFetched
(6): Unable to fetch the camera image.RemoteLocked
(7): Locked in the network version.Struct: Product
sku
(char[16]): SKU of the product.name
(char[64]): Name of the product.price
(int32_t): Price of the product in cents.Struct: PredictOutput
products
(Product[16]): Array of up to 16 product information.products_size
(int32_t): Number of products recognized in the current prediction.has_prediction
(bool): Indicates whether there is a prediction result (there may be AI recognition but no corresponding product).Function: start_service
assets_root
(const char*): Path to the resource storage.version
(const char*): Version number of the software (if unknown, use "Unknown").int32_t
status code.Function: check_status
StatusCode
representing the status.Function: register
passphrase
(const char*): Activation code. If empty, the system will be reinitialized.channel_id
(const char*): Channel ID.branch
(const char*): Branch.int32_t
status code.Function: crop_image
p_1_x
to p_4_y
(int32_t): X and Y coordinates of the four points (range: [0, 100]).int32_t
status code.Function: product_import
clear
(bool): Whether to perform a full import (clears products not in the list).data
(const char*): CSV formatted product list.int32_t
status code.Function: product_import_path
clear
(bool): Whether to perform a full import (clears products not in the list).path
(const char*): Absolute path to the file.int32_t
status code.Function: clear_product
int32_t
status code.Function: prediction
output
(PredictOutput*): Output of the recognition result.int32_t
status code.Function: raw_prediction
width
(uint32_t): Width of the image.height
(uint32_t): Height of the image.image_bytes
(const uint8_t*): Image bytes.image_len
(uint32_t): Length of the image bytes.output
(uint8_t*): Output of the recognition result.output_len
(uint32_t): Length of the output buffer.int32_t
status code.Function: feedback
sku
(const char*): SKU of the selected product.name
(const char*): Name of the selected product.backpropagation
(bool): Whether to learn from this selection result.int32_t
status code.Function: clear_learning
int32_t
status code.Function: export_learning
path
(const char*): Absolute path to the export file.int32_t
status code.Function: import_learning
path
(const char*): Absolute path to the import file.int32_t
status code.Function: save
int32_t
status code.Function: download_update_zip
arch
(const char*): Architecture.os
(const char*): Operating system.version
(const char*): Version.path
(const char*): Absolute path to save the update package.int32_t
status code.