19-06-2014, 10:53 AM
Final Project Report Barcode Scanner on a XScale PXA27x
Final Project Report.pdf (Size: 464.38 KB / Downloads: 54)
Abstract
Modern hand held devices such as smart phones and PDAs have become increasingly powerful in recent years.
Dramatic breakthroughs in processing power along with the number of extra features included in these devices has
opened the doors to a wide range of commercial possibilities. In particular, most cell phones regularly include
cameras, processors comparable to PCs from only a few years ago, and internet access. However, even with all
these added abilities, there are few applications that allow much passing or decryption of environmental
information.
As mobile devices become more like PCs they will come to replace objects we tend to carry around such as
checkbooks, credit cards, cameras, planners, mp3 players, etc. In short, we will be using them to accomplish our
daily tasks. One application that falls into this category is barcode reading. Current barcode readers often offer
decryption of data but few have been applied to online commerce. Specifically, we will be using an Intel Xscale
PXA27x device to simulate a barcode scanner with the added ability of adding items to a commercial shopping cart.
Introduction
A barcode is a machine-readable strip of data printed in parallel lines, used to represent a multitude of information.
Traditionally, a barcode scanner is used by retailers to keep track of inventory and speed up data entry. Due to their
heavy commercial and industrial sector usage, barcode scanning applications have been producer-centric, focusing
on improving the efficiency, accuracy, and productivity of supply management. In contrast, we want to create an
application that is consumer-centric. This application would function as a personal shopper, assisting the user by
allowing him to add items to an online database or "wish list". With browser integration, this application could also
be extended to search for product reviews or even price comparisons. The uses for a barcode reader in the
marketplace are numerous and there are endless ways to tie it to the consumer to make exciting and innovative
applications.
For convenience, our device should also be easy to carry and use. We are not expecting a user to haul around a
bulky device with limited functionality. Instead, we wanted the application to be loadable onto a small, multifunctional
embedded device like a cell phone or PDA. The Intel PXA27x device was the perfect instructional board
for this prototype, as it is a general purpose device capable of hosting a web browser, camera, and other useful
applications. Using the PXA27x, a barcode reader can be utilized to combine with other applications, providing the
customer with state of the art interaction. With this project we hope to add the functionality of a barcode reader into
a handheld device, and place it into the palms of an everyday consumer.
Project Description
Our project has three main goals. The first goal is to replicate a commercial barcode scanner on the Intel PXA27x
device. Milestones include configuring the on-board camera and installing image manipulation and barcode
decoding libraries. Our second goal is to decode the barcode images in real-time, quickly and efficiently. This
involves improving the image decoding algorithms and choosing efficient image manipulation and barcode libraries.
Our final goal is to connect to the web to access an online database. Milestones include installing the browser,
configuring proper network settings, and finally creating an online shopping application and database.
Our main use case will involve adding items to a Christmas shopping list. The user will pick up an item that he
desires in the store and then take a picture of its barcode. Afterwards, the barcode contents will be decoded and the
product name is found within a UPC database. The user will then be redirected to an online shopping list, with the
current item added.
There are many possibilities for what could be stored in a barcode. We could denote movie information, website
links, a save state or item in a video game, etc. Whatever the case may be, it can be thought of as linking information
using photos taken on a common handheld device. Thus, we have streamlined the transfer of data in a simple and
elegant manner.
Challenges and Limitations
One major challenge we had to deal with was camera constraints. Most barcode decoders expect a camera with autofocus
and relatively high resolution. Our included camera has neither of these. Additionally, the captured image may
need to be filtered to have the correct color, brightness, or quality. Any misalignment, skew, or distortion could
cause the barcode to be unreadable. Although Zebra's algorithms try and remedy these problems, these uncertainties
cause unreliable results
Future Work
There is a lot of future work that can be done with this project. The user experience could be improved upon. It
would greatly increase our success rate if the user were given visual or auditory clues on how to align the barcode
image for best image capture and barcode scan. We would like to add a better camera with higher resolution, autofocus,
and or macro lens to obtain accurate and fast decoding. Besides adding new hardware, we could also improve
the image capture of the camera. For example, we could combine multiple low-resolution, blurred image captures
from the camera into one super high resolution image. This improved image would be sharper and cleaner, thus
allowing us to decode the barcode despite image restrictions.
Beyond the camera, we have challenges such as efficiency of algorithms and power consumption for the device. The
barcode reader requires a lot of image processing and file input and output. This requires a huge amount of heap
memory to filter and alter the image. Currently we are using BLOB (binary large object representation) which
allocates a large buffer for the image. In the future, we would optimize the buffer size for this during image
manipulation and barcode scanning. We would also perform benchmarking during maximum memory utilization (ie:
several worst case memory consuming applications) to make sure we don't overstep the bounds on memory
allocation.
Conclusion
The barcode scanner works very close to how we expected. Because the provided camera has neither autofocus nor
flash, it was often difficult to determine the exact cause of problems. However, after extensive testing we were able
to produce a working scanner with good results. Thanks to efficient image conversion and decoding processes, the
entire process runs predictably within reasonable time constraints; roughly a few seconds. As far as resources are
concerned, waste is kept low thanks to our pipelined data processing approach. Although decoding often takes up
the majority of the process, the time it takes is usually constant. Therefore, the network connection can be
considered the major bottleneck since it may produce uncontrollable results. Barcode decoding with mobile devices
is definitely possible with the correct implementation. Yet in practice, results are dependent on the quality of the
camera as well as the speed of the network connection