With barcode scanning being a standard on mobile devices one might want to enable Intel(R) Edison to run automated barcode scannings.
Linux Barcode APIs
On Linux there are fully functional open source barcode reading libraries available such as zxing (Apache 2), or ZBar (LGPL 2.1). Whereas zxing is focused on Java, ZBar has a C implementation and hence doesn't require a Java runtime. In the following description we will use the ZBar API.
USB webcams on Intel® Edison
With recent Yocto images for Intel® Edison, drivers for UVC USB cameras are already included and you may directly use those cameras. For other cameras such as gspca webcams you might need to build the driver first in order to use the camera.
We want to be able to use zbar for live videos as well as for static images. For the latter we need the ImageMagick labraries which you can install including all dependencies directly from repo.opkg.net following the instructions via
# opkg install imagemagick_dev
<span># wget http://sourceforge.net/projects/zbar/files/zbar/0.10/zbar-0.10.tar.bz2
</span><span># cd zbar-0.10
</span><span># ./configure --without-qt --without-gtk --without-xv --without-xshm --with-imagemagick --with-x=no --prefix="/usr" </span>
<span>which should end after some time with
please verify that the detected configuration matches your expectations:
=> the GTK+ widget will *NOT* be built
=> the Qt4 widget will *NOT* be built
Unfortunately, the libtool settings don't seem to work 100%. Thus calling "make" ended with an error message. In order to finish the compilation and the install I used following workaround:
# rm libtool
# ln -s /usr/bin/libtool libtool
# make install
In case you don't have "/usr/bin/libtool" installed you can find a package e.g. at repo.opkg.net.
After a successful installation you should find the 2 binaries "/usr/bin/zbarimg" and "/usr/bin/zbarcam". The former is a sample binary reading barcodes from static images. The latter directly from a live video stream via
1# zbarcam --nodisplay
If you have OpenCV installed on Intel(R) Edison you can also combine zbar and OpenCV to run some image processing prior to detection (e.g. OpenCV & ZBar example)
For more such intel IoT resources and tools from Intel, please visit the Intel® Developer Zone
Other Popular Deals
- The 10 best job hunting apps on AndroidTop 10 Android launchers (June 2017)
- The 10 scariest horror games on AndroidAndroid app stores: 5 best alternatives to Google Play Store
- Best Android apps for rooted devices18 apps for a memorable Valentine's Day
- Top 15 Android games that you should playThe 20 best looking games for mobile phones
- 8 Android apps to tickle your funny bone17 must have apps for any Android device (plus alternatives)
- 5 apps to get the Android Lollipop look on your smartphoneTake control of your Android device with these apps
- 7 weird and strange apps for your Smartphone10 neat Google apps you may not know of
- Perfect Viewer10 essential Indian apps for Android devices