Barcode Reader SDK for Linux. Usage

This page will demonstrate how to call SD-TOOLKITŪ Barcode Reader SDK API from C application.

Reading Barcodes from Linux C or C++ Application

  1. Download and unzip the SDK content to local folder. For example, to ~/sdks/sd-toolkit/sdt-barcode-sdk
  2. Using the sdt-brc-activate tool, located in bin/ folder of the SDK, activate Purcased Developer license. Skip this step to use trail version.
  3. Add SD-TOOLKIT SDK include folder path to your application project or makefile include folders search path. Add SD-TOOLKIT SDK lib/x86 or lib/x64 folder path to your application project or makefile library search path.
  4. In C/C++ application Create instance of BarcodeReader by calling SDTCreateBarcodeReader.
  5. Specify if needed scan area on the input image in pixels where engine will look for barcode symbols by calling SDTSetActiveScanRect. By default will be used whole image.
  6. Specify barcode symbol types the BarcodeReader will look for by calling SDTSetReadInputTypes. By default the input image will be analyzed for all types which could decrease performance in most cases.
  7. Call either SDTReadImageFileA, SDTReadImageFileW or SDTReadRGBImageBuffer to process the image file or image rgb data buffer respectivelly.
  8. Check count of recognized barcode symbols by calling SDTGetResultsCount
  9. Obtain recognized barcode symbol value and properties by calling SDTGetResultValue and SDTGetResultProperties
  10. To destroy the BarcodeReader and its allocated memory call SDTDestroyBarcodeReader.