Barcode Reader using Basler Dart USB camera and Raspberry Pi 2 (also for Windows)
Barcode Reader (mbreit 2016-09-23)
This project uses the zxing ("Zebra Crossing") library to automatically identify and decode various 1D and 2D barcodes.
The latest C++ port can be found here: https://github.com/glassechidna/zxing-cpp
The original sample program which inspired this can be found here: http://www.idealsoftware.com/opensource/scan-1d-2d-barcodes-webcam-zxing-opencv-visual-c.html
It uses a Basler dart USB camera and Basler Pylon 5.0.5 drivers for image acquisition and enhancement (to offload some host processing).
Camera details can be found here: http://www.baslerweb.com/en/products/cameras/area-scan-cameras/dart
Driver details: http://www.baslerweb.com/en/support/downloads/software-downloads
It also uses OpenCV 2.4.10 for image Display and some processing.
Running the Windows_Project :
All you should have to do is build and run the program in visual studio.
The required headers and libraries for OpenCV and zxing are pre-built and included in the /lib and /include folders.
The libraries are statically linked, so you should just have one .exe file to run.
Running the Linux-x86 Project:
This is similar to the windows project. It contains headers and prebuilt OpenCV/zxing libraries for Linux Mint 17.2 (ubunutu).
The makefile will look at /include and /lib
If that doesn't work, you need to build the zxing and opencv libraries for your machine. **
Running the Linux-RPi Project:
This requires you to build the libraries (we've included a prebuilt zxing library you can try though).
The makefile expects to see the zxing library (libzxing.a) in /lib and the OpenCV libraries in /usr/lib.
To install the zxing library:
1. unpack libzxing-cpp-master.zip
2. Go to this folder, create 'cpp/build' folder
3. run 'cmake -G "Unix Makefiles" ..'
4. Go to cpp/build and run 'make'
5. Grab a coffee (on RPI est. 20 minutes to build)
6. Find libzxing.a in cpp/build. Copy it to PylonSample_Barcode/lib
1. Shortcut: See the attached application note to install prebuilt rpi libraries (building on device can take hours!).
** Building and adding libraries for the Linux-x86 Project:
(There are other ways to do this of course, this is just one example :))
To install the zxing library:
1. unpack libzxing-cpp-master.zip
2. Go to this folder, create 'cpp/build' folder
3. run 'cmake -G "Unix Makefiles" ..'
4. Go to cpp/build and run 'make'
5. Find libzxing.a in cpp/build. Copy it to PylonSample_Barcode/lib
To install the OpenCV libraries:
1. unpack opencv-2.4.10.zip
2. go to this folder and create a folder named 'release'
3. go to the release folder and run 'cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..'
4. run 'make'
5. run 'sudo make install'
6. Copy libopencv_core.so.2.4.10, libopencv_highgui.so.2.4.10, libopencv_imgproc.so.2.4.10 from XXXXX to PylonSample_Barcode/lib
(or modify the makefile to point to /usr/lib)
7. Copy the appropriate headers to /include, or modify the makefile to point to the opencv installation
License Info:
Zxing ("Zebra Crossing"): https://zxing.github.io/zxing/license.html (Apache 2.0)
Zxing-cpp: https://github.com/glassechidna/zxing-cpp/blob/master/COPYING (Apache 2.0)
Barcode Reader project (Ideal Software): see PylonSample_Barcode.cpp (BSD License)
OpenCV: see opencv.org (BSD License)
Breit | pushed d599342ee75b45204409cf11c77626632078d559 | 2020-01-22 20:11:00 UTC | |
Breit | pushed 0274acf2bc11358efcfc3e3ac018ffaa09f5c193 | 2020-01-22 20:08:03 UTC | |
Breit | pushed 0d8b5637c77a6b826346d6fc7c4d8f209b87e09b | 2020-01-22 20:03:47 UTC | |
Breit | pushed 54b9438997f195ebefba4a6468e6f4ab3323150a | 2020-01-22 20:03:47 UTC | |
MattB | pushed ac83ded25a9d0b5f6a50963eccd3a6c27c3f39b5 | 2017-08-30 20:45:11 UTC | |
MattB | pushed 6b39ee95d16a4f64e4b0d8399067ffb30ea654e2 | 2017-08-30 20:40:42 UTC | |
Matt | pushed cc05cd1e8a046a34e1bb576aeed91085edc3bf45 | 2017-08-29 19:32:03 UTC | |
Matt | pushed 4f9518d73a3f74f7207b4399306b9a0f93df014f | 2017-08-29 19:28:37 UTC | |
Matt | pushed 8a01c62d7406f190c411d46569ba6297245d1cda | 2017-08-29 19:20:32 UTC | |
Matthew B | pushed 96f3c5288241cf5d49c7a2d2a6ea068c5a160832 | 2017-08-29 17:23:26 UTC |
Title | Description | Format |
---|---|---|
Source code | Sample projects for Windows, Linux, and RPi | zip |
Screenshot | Windows Screenshot | jpg |
Screenshot 2 | Linux screenshot | jpg |
Screenshot 3 | Raspberry Pi screenshot | JPG |
Updated Source Code | Cleaned up a lot of code. See forum for details | cpp |
Task | Owner | Creation Date | |
---|---|---|---|
Add safety code to handle camera disconnects, errors, etc. | mattb | 2016-09-23 | |
Add support for saving images | mattb | 2016-09-23 | |
Add support for logging data | mattb | 2016-09-23 | |
Add support for Adafruit 2.5" TFT touchscreen | mattb | 2016-09-23 |
You'd like to participate ...
Show more
Finally added to a github repo!