Proceedings VCM 2012 53 phát hiện và nhận dạng mã vạch một chiều từ hình ảnh - Pdf 30

Tuyển tập công trình Hội nghị Cơ điện tử toàn quốc lần thứ 6 393

Mã bài: 96
A vision based method for 1D barcode detection and recognition
Phát hiện và nhận dạng mã vạch một chiều từ hình ảnh
Trần Thị Thanh Hải
Viện nghiên cứu quốc tế MICA,
HUST - CNRS/UMI - 2954 - INP Grenoble
e-Mail: [email protected]
Abstract:
While traditional methods for barcode reading use specific devices (e.g. laser scanners) which are very
disadvantageous because of their lack of mobility, reading barcodes from a camera phone is becoming an
interesting and low-cost solution in this ubiquitous computing era. This paper presents a method for 1D
barcode recognition from images. This method is composed of 2 main phases: barcode location and barcode
decoding. Our contribution found in the barcode location phase where we combine Discrete Cosine Transform
(DCT) based technique and scan-line based techniques to improve the location rate while reducing the
computational times. For the barcode decoding, a statistical recognition is used. The experimental results show
the good performance of our method in comparison with state of the art methods.
Tóm tắt
Hướng tiếp cận truyền thống để nhận dạng mã vạch thường sử dụng các thiết bị chuyên dụng như máy quét
laser. Các thiết bị này thường gắn ở một vị trí cố định, khó di chuyển. Trong một số ứng dụng như tra cứu sản
phẩm tại chỗ (ví dụ trong siêu thị, trên quảng cáo, v.v), hướng tiếp cận đọc mã vạch từ điện thoại di động là
một giải pháp thú vị và ít tốn kém. Bài báo này trình bày một phương pháp nhận dạng mã vạch từ ảnh thu nhận
từ camera của điện thoại di động. Phương pháp đề xuất gồm hai pha chính: định vị mã vạch và giải mã. Các
đóng góp chính của chúng tôi là sử dụng kết hợp hai kỹ thuật quét dòng và phép biến đổi cosin rời rạc cho
phép nâng cao độ chính xác định vị, đồng thời giảm thời gian tính toán. Các thử nghiệm cho thấy phương pháp
đề xuất cho hiệu quả nhận dạng cao, hoàn toàn có khả năng tích hợp trên điện thoại di động cho các ứng dụng
khác nhau như tra cứu sản phẩm trong siêu thị.

1. Introduction
Nowadays, barcodes, 1D barcodes in particular,

computational times.
The paper is organized as follows. In the section II,
we present and evaluate some related works. In the
section III, we propose a framework for 1D
barcode recognition and explain in more detail
each component of the framework. Some
experimental results will be presented in section
IV.

2. Related works
All methods for barcode recognition from images
must deal with two main problems: barcode
location and barcode decoding. In the literature,
394 Trần Thị Thanh Hải

VCM2012
there exists numerous approaches for barcode
localization using analysis of spatial domain [1],
Gabor filtering [2], analysis of Wavelet domain [3],
or DCT domain [4].
Based on the observation that a barcode is
composed of parallel and adjacent bars and spaces,
which are usually aligned horizontally, a barcode
region should be dominated with vertical texture
then a wavelet based method has been used to
locate barcode regions in [3]. With wavelet
transform, an image is divided into four subbands
(one low-frequency subband and three high-
frequency subbands). Using the characteristics of
high-frequency wavelet subbands, some criteria

results in case where there are no high textured
regions in the image than barcode regions.
However, the paper did not resolve the problem of
barcode recognition.
Wavelet-based and DCT-based approaches allow
locating barcode regions in images. However, these
methods are sometime quite time-consuming. A
simple but quite efficient technique that is widely
used in the literature is scan-line-based [5], [6].
First, a scan-line passing the center of the image
will be extracted. Then the curve built from the
intensity of points lying on this scan-line will be
smoothed using a Gaussian filter. The maxima /
minima of this smoothed curve will be determined
that help for finding dynamic thresholds for
binarizing the curve. With the binary curve, the
width of spaces and bars will be calculated.
Barcode recognition is done by digit classification
using similarity measure between the candidate and
the references. About 1000 images of barcodes
have been taken by a N95 camera phone. The
recognition rate of 90.5% at 640x480 image
resolution was achieved with assumptions that
there is only one horizontal barcode at the center of
each image.
In summary, most of methods for barcode location
are based on specific properties of barcode, which
are the parallel and dense distribution of bars and
spaces. DCT can locate barcode area in all
directions while current scan-line based approach

checksum computed from the first 12 digits. The
barcode starts with a left-hand guard bar (black-
white-black) and ends with a right-hand guard bar
(black-white-black). Between the guard bars, there
are two blocks, each composed of 6 digits,
separated by a center guard bar (white-black-white-
black-white). Two different EAN-13 barcodes will
Tuyển tập công trình Hội nghị Cơ điện tử toàn quốc lần thứ 6 395

Mã bài: 96
have the same amount of bars and spaces but the
width of these bars and spaces will be different
because they encode different numbers. These
characteristics of barcode will be used in barcode
location and recognition presented in the next
sections.

Figure 1. Structure of an EAN-13 barcode
3.2 Proposed framework for 1D barcode
recognition
Based on analysis on barcode structures and their
appearances, we found that both DCT and scan-
line based techniques are good for barcode
location. For barcode decoding, a statistical method
seems to be convenient. We propose therefore a
framework for barcode location and decoding as in
the Figure 2. The framework is composed of 3
principal modules: 1) localization of 1D barcode
region in the image; 2) once the barcode region is
located, it is extracted from the image and

4. Group all DCT-coefficients
ij
c of one
frequency range f of the average DTC block
into an array
f
G , so that
})1, ,1{)(}, ,1{)(,  fifjfjficG
ijf
. For example, },,,,{
23133332313
cccccG  .
Then calculate the largest DCT-coefficient
)max(
max ff
Gc 
from each frequency range f in
the average block. The coefficients
maxf
c indicate the coefficients in the barcode
area that are strongest.
5. Compute a weight matrix W of dimension 8x8
where each elements w
ij
is defined as follow:






thresholding technique.
9. Look for 8-connected components.
10. Choose rectangular connected regions as
candidates of barcode region.
b) Scanline-based method
The DCT based algorithm gives an approximate
location of the barcode region. We consider it as
the region of interest for which we will apply the
396 Trần Thị Thanh Hải

VCM2012
scan-line based technique to re-localize in a more
accurate manner. The output of this phase is a
region of barcode well localized with boundaries
which are correctly determined to pass to the
barcode decoding.
2) Barcode Decoding: Barcode decoding is
carried out in the following steps as illustrated in
the Figure 3. We can see in this figure two main
phases: 1) learning digit classifiers and 2) barcode
decoding given a new barcode area.
a) Digit and barcode representation
As analyzed above, bars and spaces can cover one
to four modules of the same color. Each digit is
composed of two bars and two spaces with a total
width of 7 modules. We represent each digit by a
vector of 4 elements corresponding to the widths of
ordered bars and spaces. This vector will be
normalized to unit magnitude so that it is invariant
in case of scale change of barcode.

most similar one. This makes a hypothesis of the
barcode. This hypothesis will be passed to the
verification step of the checksum number. If it is
correct, the hypothesis is confirmed. If not, we
generate other hypothesis (by changing the meta-
number) and verify until we obtain a valid code.

4. Preliminary results and discussions
4.1 Dataset preparation
For learning and testing, a dataset needs to be
prepared. Until now, the number of samples for
training each digit class remains quite modest (we
use only 10 images of barcode). For testing we use
100 images taken from different sources
(http://cvpr.uni-muenster.de/research/barcode) or
by ourselves. These images contain barcodes with
different status: change in size, orientation, noise,
dirty, reflections, etc. The image resolution is
640x480.
4.2 Experimental results
The proposed method for barcode recognition will
be evaluated based on 3 performance measures: 1)
barcode localization rate; 2) barcode recognition
rate; and 3) computational time.
Barcode localization rate is the ratio between the
number of located barcode regions and the total
number of barcode regions in the ground truth. A
barcode region is considered as located if the
located region covers more than 80% the ground
truth region. Barcode recognition rate is the ratio

scan-lines
80 80 2.28
DCT 80 75 1.54
DCT and
scan-line
80 80 0.33

We found that the technique based on one scan-line
gives worst results in term of barcode localization
and recognition rate. When using multiple scan-
lines, the noisy influence will be decreased, that
improves the performance in both localization and
recognition rate. However, the computational time
will increase. Our proposed method (DCT
combined with one scan-line technique) gives a
better performance in localization rate than the case
using multiple scan-lines. An additional advantage
of this combined technique is that it is quite
efficient in term of computational time.
In the below figures, we show some examples of
barcode localization using our combined method.
We can see this method can deal with difficult
situations such as barcode is un-planar (Figure 4),
barcode is rumpled (Figure 5), or shadowed
(Figure 6). In all of these figures, the green
rectangles are the barcode regions located by the
only DCT technique; the red ones are the barcode
regions localized using the combined technique.

Figure 4. Localization of unplanar barcode

Processing,. 2005: Bangkok, Thailand. p. 1595
- 1599
[2] A.K. Jain and Y. Chen. Bar code localization
using texture analysis in Proceedings of the
Second International Conference on Document
Analysis and Recognition. 1993.
[3] R. Oktem, Barcode localization in wavelet
domain by using binary morphology, in Proc.
of IEEE SIU'04. 2004. p. 499-501.
[4] A. Tropf and D. Chai, Locating 1-D Bar Codes
in Dct-Domain, in Proceedings. 2006 IEEE
International Conference on Acoustics, Speech
and Signal Processing. 2006: Toulouse, France.
[5] O. Gallo and R. Manduchi, Reading
Challenging Barcodes with Cameras, in Proc.
of IEEE Workshop on Applications of
Computer Vision. 2009, 7. p. 1-6.
[6] S. Wachenfeld, S. Terlunen, and X. Jiang,
Robust 1-D Barcode Recognitionon Camera
Phones and Mobile Product Information
Display, in Lecture Notes in Computer Science,
Springer-Verglas Berlin Heidelberg. p. 53-69.
[7] http://redlaser.com/.
398 Trần Thị Thanh Hải

VCM2012
[8] http://shopsavvy.com/.
[9] http://code.google.com/p/zxing/.


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status