Sunteți pe pagina 1din 4

2014 11th International Joint Conference on Computer Science and Software Engineering (JCSSE)

HC2D Barcode Reader using Embedded Camera in


Android Phone

Puchong Subpratatsavee, Narongrit Janthong, Preeyawal Kuha, Chanchira Chintho


Faculty of Science at Si Racha
Kasetsart University Si RaCha Campus
Chonburi, Thailand
puchong.sp@gmail.com, narong.jt@gmail.com, srcpwk@ku.ac.th, amazon.hero.v6@gmail.com

Abstract— The HC2D barcode is a highest capacity of 2D 7,250 numeric characters, 10,100 ASCII characters. HC2D
barcode while it occupies a small area. The size of the HC2D barcode use the Reed-Solomon [6] error correction which can
barcode is suitable for displaying on print media such as paper detect and correct multiple errors and HC2D barcode have an
and poster. But, for reading the HC2D barcode, the bit option to compression data it’s powerful for a large of data.
representation of the barcode is obtained by scanning the image HC2D barcode can be read by standard scanners machine. The
of the barcode with scanner machine only. This paper shows the HC2D barcode is a greater capacity than other 2D barcodes.
implementations of image reorganization of HC2D barcodes in Moreover, the shape of HC2D barcode is suitable for use with
mobile phones with android operating system. The mobile phone paper documents or print media. The HC2D barcode are shown
system used here consists of a camera, mobile application and
in Fig. 1.
display device, and the source image is captured by the
embedded camera device. The introduced algorithm is based on
the code area found by two vertical line, one horizontal line and
dash line detection of HC2D barcode. This algorithm is robust
for the real-time recognition of the HC2D barcodes and an
average recognition rate is 91.33%.

Keywords—HC2D barcode; android; embedded camera


Fig. 1. The HC2D barcode
I. INTRODUCTION
Nowadays, almost of mobile phones have embedded The HC2D barcode consists of a vertical line on the left of
camera devices, and some of those have more than over mega- the barcode and a horizontal line on the bottom. The top of the
pixel range image sensor cameras. Also, the embedded camera vertical line is a detection point. Another detection point is
devices can be used as new input interfaces such as for symbol where the vertical line and horizontal line meet. The dash line
recognition. In the recent, most mobile phones, with camera on the top is used for sampling column widths. The vertical
devices support symbol recognition, such as 1D barcode and line on the right is the stop indicator. Finally, the data area is
2D barcode [1] (PDF417 barcode [2], data-matrix barcode [3], configured as a 63x448 matrix which can store black and white
and QR code [4]) and these code symbols are used for reading pixels up to 28,224 pixels. The characteristics of the HC2D
URLs or plaintext. HC2D barcode [5] is largest capacity of 2D barcode are shown in Fig. 2.
barcode for communication, public relations, and data
transport. However, in general, the HC2D barcode can
recognition only in scanner machine.
This paper presents HC2D Barcode readers using the
embedded camera device in mobile phones. The purpose is to
design a new image recognition algorithm for read the HC2D
barcode in real time mode. This paper consists of five sections.

II. HC2D BARCODE


A HC2D barcode is a 2D barcode which consists of a black
square pattern on white background. The HC2D barcode
contains information in the vertical direction as well as the
horizontal direction. The data capacity can be the maximum of
Fig. 2. The characteristics of HC2D barcode

‹,((( 254
2014 11th International Joint Conference on Computer Science and Software Engineering (JCSSE)

III. ERROR DETECTION AND CORRECTION image sharpening technicians, it can be described by this
formula.
Regardless of the design of the two-dimensional barcode,
there will be errors. The image of the barcode may be
damaged or unclear. In other words, the barcode obtained
from scanning differs from the original. Therefore, it is
essential to be able to detect and correct errors which may
occur. There are many techniques for error detection and
correction. A multiple bits error correction method based on
cyclic redundancy check (CRC). The error correction which is
widely used is Reed-Solomon code. This is because it is Where explains the pixel value of a grayscale
easier to encode than other encoding techniques and the error image. From above formula, the Laplacian operator indicate
the kind of one pixel relation to its enclosing four pixels. When
correction code is small. Moreover, error detection and error
it is used to get the sharpened image, the sharpened pixel value
correction can be performed quickly and efficiently. Reed- is
Solomon codes are prominently used in consumer electronics
such as CDs DVDs, and Blue-ray Discs. The Reed-Solomon
error correction is also used in two-dimensional barcodes such
as PDF417 barcode, Data matrix, Maxi Code, QR Code and
Aztec Code. This allows correct reading even though a Where k is parameter about with scatter effect, and it
portion of the barcode is damaged. should be chosen reasonably conforming to the practice
situations, since it affects the sharpening effect directly.
IV. BARCODE RECOGNITION ALGORITHM
3)Image binarization: its means that researcher should
In the process of HC2D barcode recognition, researcher convert the grayscale image into binary image through the
suppose that each image taken by the camera device of mobile threshold conversion ideas. For the binarization a dynamic
phone should have the completed HC2D barcode for lower the threshold is needed, also, it is very essential. Researcher are
computation. The HC2D barcode expected algorithm, as most involved about the HC2D barcode in the entire image, so
characterize in Fig. 3, is split into three section: image pre- researcher get an image of 80*80 pixels in the canter, after that
processing, edge detection, and image decoding. researcher get the grey histogram, finally, researcher get the
threshold T through the two-peak method. The threshold T can
Barcode image Image pre- productively divide bars and empty bars of the HC2D barcode.
processing In conformity with the following formula researcher will get
the binary image g(x,y).

Edge
Detection
4)Median filtering: There are a lot of noise in the binary
image because the brightness of the master image are not well-
formed and the background images are not the identical, not
Image only in the area of the barcode, but also in the outside of the
Data Decoding area. For obtain the appropriate barcode, then researcher use
some filter processing. Since the characteristic of the HC2D
barcode, median filtering is a good method. First of all,
researcher get another four pixels approximately the pixel
Fig. 3. The HC2D barcode expected algorithm
which will be processed, two in the above and two in the
A. Image Pre-processing following; then, researcher sort the five pixels; at last,
1)Grey-scale processing: It serves the arrangements for the researcher use the median instead of the current pixel. In this
threshold of the digital image transformation. Grey characterize way, salt and pepper noise is eliminated, and background area
any shade between black and white collectively, white, black of the noise can be quiet.
and the range of greys between them are known as achromatic
colors or neutral colors. B. Edge Detection
2)Image sharpening: in consideration to make the image Edge detection is a basic tool used in most image
become clearer, researcher do some sharpening process to the processing applications to get data from the frames as a
blurred HC2D barcode image. The significance of the blurred predecessor step to feature extraction and object segmentation.
image is the attenuating of the high frequency component. So Since the characteristic of the HC2D barcode, researcher use
researcher apply laplacian [7] sharpening algorithm to sharpen vertical-based edge detection and horizontal-based edge
the grey scale image. Laplacian operator is generally used detection operators. The pixel which will be detected is
determined by ten nearness pixels. The value of S(x,y) is

255
2014 11th International Joint Conference on Computer Science and Software Engineering (JCSSE)

complete of the sum of ten modules. Since the edge detection your conference for the name of your paper. In this newly
image is a binary image, ether white (255) or black (0), created file, highlight all of the contents and import your
researcher set the criterion t = 255 X 4 = 1020, so if the pixel prepared text file. You are now ready to style your paper; use
is called an edge, there are must at least four black and white the scroll down window on the left of the MS Word Formatting
mutations in this nearness. In conformity with the following toolbar.
formula researcher obtain the binary image h(x,y). To perform experiments, researcher implement an
algorithm in the platform of Android 4.3 on Mac OS by using
the language of Java, then import the program to Samsung
galaxy note 3. This experiment take 600 images by using the
Samsung galaxy note 3 in different places and lighting
conditions, 150 of them are taken in the room during the
daytime, 150 of them are taken outdoors during the day, 150 of
them are taken in the room at night, others are taken outdoors
After detected edge of HC2D barcode, then go to the top at night. From the 600 images, 52 of them cannot be decoded
of left edge and read the dash line on the top of HC2D barcode correctly, with an average recognition rate of 91.33%. The
for sampling the column width. results are shown in Table 1.
C. Image Decoding The falsity come from two reason: One is from the image
For reading the HC2D barcode, the bit representation of the light, because of the recognition exactitude of the boundary
barcode is obtained by scanning the image of the barcode by between the black and white parts, the lighting situation are
camera device of mobile phone and converting the image. very essential. The other is the form of the image, if the image
After obtaining the barcode which may be damaged, the Reed- is a severely distorted one, it will get the incorrect consequence
Solomon error correction is performed. If the original data was after edge detection and image segmentation, not to claim the
previously compressed, the resulting data is then exact barcode. Fig. 5 shows an example of experimental results
uncompressed. If there is an error in correcting the code, data using our algorithm.
decompression will generate an error. Otherwise, the original
data will be obtained. The process for reading the HC2D TABLE I. THE RESULTS OF HC2D BARCODE RECOGNITION
barcode is shown in Fig. 4.
Data items Images Correct Recognition
decoding rate
HC2D Barcode In the room
(daytime) 150 138 92%
Outdoors
(daytime) 150 140 93.33%
Reed-Solomon In the room
(night) 150 136 90.67%
Outdoors
Uncompressing (night) 150 134 89.33%

Total 600 548 91.33%

Message

Fig. 4. The process for decoding data from a HC2D


barcode
In order to detect the error correction level, the algorithm
first processes the first pixel group as the low error correction
level. If the header is obtained correctly, the error correction is
at the low level. Otherwise, the algorithm processes the first
pixel group at the high error correction level. The header
verification is done using the checksum field. If the checksum
value matched the one calculated, the assumed error correction
level is accurate.

V. EXPERIMENTAL RESULTS Fig. 5. Example of experimental results.


After the text edit has been completed, the paper is ready
for the template. Duplicate the template file by using the Save
As command, and use the naming convention prescribed by

256
2014 11th International Joint Conference on Computer Science and Software Engineering (JCSSE)

VI. CONCLUSION [3] L. Biao, “A DataMatrix-based mutant code design and recognition
method research”, Proceedings of the 4th international conference on
This paper presented an algorithm for HC2D barcode image and graphics., pp. 570-574, Aug. 2007.
recognition on mobile phone. As show in experimental results, [4] M. Warasart and P. Kuacharoen, “Paper-based Document
our algorithm has a high recognition rate. In the next, Authentication using Digital Signature and QR Code”,
researcher will make the HC2D barcode recognition more [5] International Proceedings of Computer Science and Information
exact and helpful for improving the algorithm to retreat the Technology, ISSN 2010-460X, International Conference on Computer
decoding time. Engineer-ing and Technology., pp. 94-98, vol. 40, Jun. 2012.
[6] P. Subpratatsavee and P. Kuacharoen, “An Implementation of a High
Capacity 2D Barcode”, Communications in Computer and Information
REFERENCES Science, Springer, ISSN 1865-0929, 5th International Conference on
Advances in Information Technology., pp. 159-169, vol. 344, Dec. 2012.
[1] J.Z. Gao, L. Prakash, R. Jagatesan, “Understanding 2D-BarCode
Technology and Applications in M-Commerce – Design and [7] S. Mamidi, M.J. Schulte, D. lancu, A. lancu, and J. Glossner,
Implementation of A 2D Barcode Processing Solution”, 31st Annual Intl “Instruction Set Extensions for Reed-Solomon Encoding and Decoding”,
. Computer Software and Applications Conference (COMPSAC 2007)., 16th IEEE International Conference on Application-Specific Systems,
pp. 49-56, vol. 2, Jul. 2007. Architecture Processors, pp. 364-369, Jul. 2005.
[2] C. Rong, L. Zhen-ya, J. Yan-hu, Z. Yi, and T. Li-yu, “Coding Principle [8] L. Zhang, H. Ying, X. Jiazhi, X. Xuexiang, and C. Wei, “Real-Time
and Implementation of Two-Dimensional PDF417 Bar code”, 6th IEEE Shape Illustration Using Laplacian Lines”, IEEE Transactions on
Conference on Industrial Electronics and Applications., pp. 466-468, Visualization and Computer Graphics., vol. 17, pp. 570-574, Aug. 2007.
Jun. 2011.

257

S-ar putea să vă placă și