Professional Documents
Culture Documents
I. INTRODUCTION
With the advent of the microprocessors and digital
cameras, using the digital images captured from cameras
for many non-traditional applications has seen a sharp rise.
One such application is using smart cameras for barcode
decoding, where a digital image is processed by a
microprocessor to obtain the data coded in the barcode.
Since prices of both digital cameras and microprocessors
are going down in a rapid pace, such an apparatus can
effectively replace high cost traditional barcode scanners.
However, processing barcode images introduces lot of
challenges since the images can be blurred, rotated, or
distorted. A trivial scan line based approach may not work
for most of the images and number of people has proposed
approaches that are more sophisticated.
Given an image containing a barcode, finding the data
string encoded in the barcode is usually two fold:
Searching the image to find the barcodes called
barcode localization
Decoding the barcode and extracting the
information contained called decoding (reading)
In this paper, our focus would be on the barcode decoding
or reading phase, where we have introduced a simple yet
powerful algorithm to decode most types of 1D barcodes.
II. BACKGROUND
Fig. 1 The thin lines show the ideal waveform from a scan, while the
dotted line shows a possible output from a sensor [8]
Edge Detection on
Horizontal Scan Lines
Calculate Mid
point of thick
edges
Determine the
angle of this bar
Remove Noisy
edge points
-1
-2
-1
1
2
1
-1
-2
-1
0
0
0
1
2
1
Fig. 3 2x3 and 3x3 Sobel masks used to detect vertical edges
Matched line
Calculate the
widths of the bars
Horizontal
scanlines
but different
offsets to
edge points
Per
f
orm EAN13
decoding
Check Digit
calculation
Fig. 6 Stages in the decoding the barcode after the first stage of
identifying the bars
x>T
x<T
Fig. 7 Sorted bar widths in a line; can be decoded (top); cannot be
decoded (bottom)
Wi ,i [1, N ]
Calculate
list
Z,
AvgW,
where
(W Wi )
Z i = i +1
,i [1, N 1]
W
i
where
a
new
list
(Wi +1 +Wi )
AvgWi =
,i [1, N 1]
2
if (w AvgW1 ) then w C
Fig. 9 faded EAN13 code, the algorithm compensates the faded regions
from good ones
IV. RESULTS
The prototype algorithm was written in C# using .NET
framework 2.0. The programs main window is shown in
Fig. 8.
ACKNOWLEDGMENT
I want to thank the management of the Zone24x7 Inc,
who provided the necessary guidance and resources to start
and continue the project from start to end. Special thanks
go to Manjula Dissanayake and Llavan Fernando for the
encouragement provided in the same.
REFERENCES
[1]
[2]
[3]
[4]
[5]
[6]
N. Normand, C. Viard-Gaudin,
A two-dimensional barcode
reader,12th International Conference on Pattern Recognition, vol.
3, pp. 201-203, October 9-13, 1994.
[7]
[8]
[9]