Barcode Xpress for Linux Samples
Hello Barcode Xpress for Linux
This is a sample intended to help getting started with Barcode Xpress for Linux as quickly as possible. You can check it out here: https://github.com/Accusoft/hello-barcode-xpress-for-linux. Instructions for building and running this sample can be found at the link provided.
ReadBarcodes
This is a simple sample showcasing how to read barcodes from BMP images. We use CMake and Make to make building the sample easier.
ReadBarcodesIG
ReadBarcodesIG shows the import of other file formats via ImageGear for C and C++ and reading barcodes using BX_analyze_dib. To use this sample, you'll need to install ImageGear for C and C++ on your machine. You can find it here: https://www.accusoft.com/products/imagegear/get-it/.
WriteBarcodes
WriteBarcodes uses BX_create_file and BX_create_dib to create barcodes and then reads them back.
ReadBarcodesPython
ReadBarcodesPython demonstrates using BX from python and includes a wrapper module that can be dropped into other python projects. We have two samples that show how to use Barcode Xpress and Python together: ReadBarcodesPython and ReadBarcodesOPenCV. ReadBarcodesPython is a basic sample that reads in barcodes on BMP images passed in via the command line and outputs the results. ReadBarcodesOpenCV is basically the same thing, except it uses OpenCV to images other than BMP.
Requirements
- Python 3.6+ (for ReadBarcodesPython)
- OpenCV 2 and Numpy pip packages (for ReadBarcodesOpenCV)
Usage
Building and Running the C++ samples (ReadBarcodes, ReadBarcodesIG, and WriteBarcodes)
To build the C++ samples, change the terminal's working directory to the directory of the sample you wish to build and run. Then, use Cmake to build the sample.
cmake . && make
To run the ReadBarcodes:
./readbarcodes ../images/Barcode-All-Supported-Types.bmp
To run ReadBarcodesIG:
./readbarcodesig ../images/Barcode-All-Supported-Types.bmp
WriteBarcodes takes in no arguments, simply run it:
./writebarcodes
Running the Python Samples
Running the python samples is easy, just pass in the path of the file you wish you read.
python3 ReadBarcodesOpenCV.py ../images/Barcode-All-Supported-Types.bmp
python3 ReadBarcodesPython.py ../images/Barcode-All-Supported-Types.bmp