Automatic Recognition Algorithm of Quick Response Code Based on Embedded System



Similar documents
How To Fix Out Of Focus And Blur Images With A Dynamic Template Matching Algorithm

Demonstration of Barcodes to QR Codes through Text Using Document Software

High Capacity Colored Two Dimensional Codes

WHITE PAPER DECEMBER 2010 CREATING QUALITY BAR CODES FOR YOUR MOBILE APPLICATION

Locating and Decoding EAN-13 Barcodes from Images Captured by Digital Cameras

LIST OF CONTENTS CHAPTER CONTENT PAGE DECLARATION DEDICATION ACKNOWLEDGEMENTS ABSTRACT ABSTRAK

About Data Matrix Symbology

Barcodes principle. Identification systems (IDFS) Department of Control and Telematics Faculty of Transportation Sciences, CTU in Prague

An Implementation of a High Capacity 2D Barcode

Intelligent Database Monitoring System using ARM9 with QR Code

Automated Examination Using QR Code

How To Filter Spam Image From A Picture By Color Or Color

QR Codes and Other Symbols Seen in Mobile Commerce

Automatic License Plate Recognition using Python and OpenCV

APPLICATION NOTE. Atmel AT01180: Barcode and QR code scanner User Guide. Atmel 32-bit Microcontroller. Features. Introduction

OCR and 2D DataMatrix Specification for:

CHAPTER I INTRODUCTION

Automatic Location for Multi-Symbology and Multiple 1D and 2D Barcodes

Application of Data Matrix Verification Standards

Thresholding technique with adaptive window selection for uneven lighting image

Image Compression through DCT and Huffman Coding Technique

JPEG compression of monochrome 2D-barcode images using DCT coefficient distributions

Matt Cabot Rory Taca QR CODES

Paper-based Document Authentication using Digital Signature and QR Code

Handwritten Character Recognition from Bank Cheque

Research Article 2D Barcode Image Decoding

PageX: An Integrated Document Processing and Management Software for Digital Libraries

2D COLOR BARCODES FOR MOBILE PHONES

A System for Capturing High Resolution Images

Enhanced Bar Code Engine

Navigation Aid And Label Reading With Voice Communication For Visually Impaired People

The Role of Size Normalization on the Recognition Rate of Handwritten Numerals

Determining optimal window size for texture feature extraction methods

A secure face tracking system

Face detection is a process of localizing and extracting the face region from the

Let s talk symbology. A guide to decoding barcodes

May Prepared: Product version: Keyword: Accelio Present Central 5.4. Original value:

Selecting the Correct Automatic Identification & Data Collection Technologies for your Retail Distribution Center Application

1 Introduction. 1.1 Overview of barcode technology Definition of barcode

Image Processing Based Automatic Visual Inspection System for PCBs

Personal Identity Verification (PIV) IMAGE QUALITY SPECIFICATIONS FOR SINGLE FINGER CAPTURE DEVICES

Method of Mesh Fabric Defect Inspection Based on Machine Vision

2D BARCODE STANDARD FOR LENSES (OPTICAL PRODUCT CODE/ COUNTRY OF ORIGIN)

Signature Region of Interest using Auto cropping

To effectively manage and control a factory, we need information. How do we collect it?

Making Multiple Code Reading Easy. Webinar

Laser coding a technology of choice for the Pharmaceutical industry

Analecta Vol. 8, No. 2 ISSN

white paper JANUARY 2011 The Next- Warehouse Scanning and the Emergence of 2D Bar Codes

ECE 533 Project Report Ashish Dhawan Aditi R. Ganesan

LOCAL SURFACE PATCH BASED TIME ATTENDANCE SYSTEM USING FACE.

A Fast Algorithm for Multilevel Thresholding

Attendance Checking System Using Quick Response Code for Students at the University of Sulaimaniyah

Poker Vision: Playing Cards and Chips Identification based on Image Processing

COLOR-BASED PRINTED CIRCUIT BOARD SOLDER SEGMENTATION

MAVIparticle Modular Algorithms for 3D Particle Characterization

Barcode Based Automated Parking Management System

A Lightweight and Effective Music Score Recognition on Mobile Phone

A Study of Automatic License Plate Recognition Algorithms and Techniques

Algorithm for License Plate Localization and Recognition for Tanzania Car Plate Numbers

Chapter 11 I/O Management and Disk Scheduling

AATB/ICCBBA Interim Guidance Document. For use of ISBT 128 by North American Tissue Banks

Integrated Sensor Analysis Tool (I-SAT )

A Binary Adaptable Window SoC Architecture for a StereoVision Based Depth Field Processor

DEVNAGARI DOCUMENT SEGMENTATION USING HISTOGRAM APPROACH

A Short Introduction to Computer Graphics

The Layman's Guide to ANSI, CEN, and ISO Bar Code Print Quality Documents

3D Scanner using Line Laser. 1. Introduction. 2. Theory

VECTORAL IMAGING THE NEW DIRECTION IN AUTOMATED OPTICAL INSPECTION

Softek Software Ltd. Softek Barcode Reader Toolkit for Android. Product Documentation V7.5.1

Contents. Bar code data transmission specifications...b-1. A October 1997 i

Open Access A Facial Expression Recognition Algorithm Based on Local Binary Pattern and Empirical Mode Decomposition

Printed Circuit Board Defect Detection using Wavelet Transform

SE05: Getting Started with Cognex DataMan Bar Code Readers - Hands On Lab Werner Solution Expo April 8 & 9

A Method of Caption Detection in News Video

Demo: Real-time Tracking of Round Object

Technical guide 1. june 2011

Document Image Analysis. Lawrence O Gorman Rangachar Kasturi

Mean-Shift Tracking with Random Sampling

NiceLabel Designers Version 6.1 Release Notes. Rev-1305

A Multiple-Choice Test Recognition System based on the Gamera Framework

ROBOTRACKER A SYSTEM FOR TRACKING MULTIPLE ROBOTS IN REAL TIME. by Alex Sirota, alex@elbrus.com

Super-resolution method based on edge feature for high resolution imaging

The Application and Design of QR Code in Scenic Spot s eticketing System -A Case Study of Shenzhen Happy Valley

Advanced QR Code Based Identity Card: A New Era for Generating Student ID Card in Developing Countries

Static Environment Recognition Using Omni-camera from a Moving Vehicle

Degree Certificate Authentication using QR Code and Smartphone


Circle Object Recognition Based on Monocular Vision for Home Security Robot

Research on Chinese financial invoice recognition technology

A Learning Based Method for Super-Resolution of Low Resolution Images

Implementation of OCR Based on Template Matching and Integrating it in Android Application

The enhancement of the operating speed of the algorithm of adaptive compression of binary bitmap images

Detection and Restoration of Vertical Non-linear Scratches in Digitized Film Sequences

Character Image Patterns as Big Data

Modelling, Extraction and Description of Intrinsic Cues of High Resolution Satellite Images: Independent Component Analysis based approaches

Lecture Notes, CEng 477

Potential of face area data for predicting sharpness of natural images

Visual Product Identification for Blind

A General Framework for Tracking Objects in a Multi-Camera Environment

Transcription:

Automatic Recognition Algorithm of Quick Response Code Based on Embedded System Yue Liu Department of Information Science and Engineering, Jinan University Jinan, China ise_liuy@ujn.edu.cn Mingjun Liu Department of Information Science and Engineering, Jinan University Jinan, China ise_liumj@ujn.edu.cn Abstract The automatic recognition algorithm of Quick Response Code is discussed in this paper. An image processing system based on embedded system is described to be able to binarization, location, segment, and decoding the QR Code. In order to adapting various sizes, various gray-level values, and under various lighting conditions of real bar code image, a high-speed, high-accuracy binarization method is developed, which can locate the finder pattern accurately and integrate the local thresholding method with global thresholding. Experiments have shown that over 99% barcode can be optimally recognized with the proposed algorithm. It can achieve higher recognition rate of high density bar code, and is applicable to real world scene image. 1. Introduction Bar code is a fast, easy, accurate and automatic data collection method. Barcode enables products to be tracked efficiently and accurately at speeds not possible using manual data entry systems. Twodimensional barcode is developed from one dimensional barcode, and its encoding information is stored in horizontal and vertical direction. Twodimensional barcode offer many advantages: small area, high capacity, high density, error detection etc. It can be configured into a stacked or matrix format symbology. The stacked barcode is where linear bar codes are stacked one upon another and are printed in a rectangular shape to achieve the most efficient use of label area. PDF417 is a kind of stack two-dimensional barcode. The matrix barcode is that code the data based on the position of black spots within a matrix. Each black element is the same dimension and it is the position of the element that codes the data. QR Code is a typical matrix two-dimensional barcode. The barcode reader only be used to recognize the barcode, and the price of it is expensive. Now mobile phones can implement many new kinds of applications such as taking photos, and movie shooting by using embedded camera devices. So mobile phones with embedded camera devices can be used to recognize the barcode. We introduce a new image recognition algorithm based on embedded system. This algorithm was used in the current mobile phone architecture which implements an embedded Linux system. Simply introduction of QR Code is in Section 2. The main algorithm is discussed in section 3, its experiment results are given in section 4, and finally conclusion is given. 2. Encoding of QR Code 2.1. Features of QR Code QR Code (Quick Response Code) is developed by Denso Corporation in 1994, as shown in Fig. 1. There are 40 versions in QR Code, four levels of error correction, and the maximum symbol size (the highest version) can encoding 7089 numeric data or 4296 alphanumeric data [1]. The highest level of error correction allows recovery of 30% of the symbol code words. In addition to, QR Code has many advanced features: Fig. 1. Example of QR Code symbol 1) High capacity encoding of data QR Code has high capacity encoding of data, its maximum symbol can encode 7089 characters; while PDF417 only encode 2710 characters. 2) High-speed reading

Adapted with CCD reading, it can recognize more QR Code symbol per second than PDF417 symbol for encoding same data capacity. 3) Chinese encoding capability Chinese and Japanese characters are represented by a two byte combination in other twodimensional barcode. But in QR Code, there is a specific Chinese mode; it can use 13 bits encoding a Chinese character. So the efficiency of Chinese represented improved 20% in QR Code compared with PDF417. 4) Readable from any direction from 360 degree QR Code is a matrix two-dimensional barcode; it can be readable from any direction from 360 degree. But the stack two-dimensional barcode, for example PDF417, is very difficult to realize the readable from 360 degree. QR Code has been approved as an AIM Standard, a JIS Standard and an ISO standard [1]. So QR Code is being used in a wide variety of applications, such as manufacturing, logistics, and sales applications. In 2000 years, QR Code is being issued as National standard in China [2]. 2.2. Encoding of QR Code Each QR Code symbol consists of an encoding region and function patterns, as shown in Fig. 2. Finder, separator, timing patterns and alignment patterns comprised function patterns. Function patterns shall not be used for the encoding data. The finder patterns located at three corners of the symbol intended to assist in easy location of its position, size and inclination. Fig. 2. The structure of QR Code The encode procedure of QR Code including follows steps. Firstly input data is encoded in according to most efficient mode and formed bit stream. The bit streams are divided into codewords. Then codewords are divided into blocks, and add error correction codewords to each block. All these codewords are put into a matrix and are masked with mask pattern. Finally function patterns are added into the QR symbol. A QR Code symbol is formed. 3. Automatic recognition of QR Code 3.1. Gray conversion QR Code symbol is captured by embedded system with CCD or CMOS, and it is a colorful image. QR Code symbol is a set of dark and light pixels. It is needless to deal with color information and the gray image calculated quickly with little space, so gray conversion is needed to do firstly. 3.2. Binarization Binarization of gray scale images is the first and important step to be carried out in pre-processing system. Selecion of a proper binarization method is critical to the performance of barcode recognition system. In binarizing an image, a simple and popular method is thresholding. There are two types of thresholding methods: global and local thresholding [3]. Among more than 20 thresholding methods, [4] concluded that Otsu s method is the best, which chooses the threshold that minimizes within-group variance [5]. By using a global thresholding method, if an image has variable lighting conditions, the resulting binary image will be very bad. In this case, a local thresholding method performs better. A goal-directed performance evaluation of eleven popular locally adaptive thresholding algorithms were performed in [6] for map images. His experimental results indicated that Niblack s method with postprocessing step appears to be the best. The main problems with a local thresholding method are hard to set a right window size, eliminate the block effect, and reduce the execution time. However, memory restrictions and embedded system requirements preclude the use of binarization algorithms that require a priori knowledge of the full image and large execution time, thus a number of well-known locally adaptive algorithms cannot be use. In international standard of QR Code [1], a global threshold by taking a middle value between the maximum reflectance and the minimum reflectance in the image is used. This method is inapplicability to non-uniform lighting conditions, as shown in Fig.3. Among the possible global binarization methods, Otsu s threshold algorithm is iteratively used to generate threshold candidates. Otsu s algorithm[7] was widly used due to its simplicity, efficiency. But in our test, Otsu s algorithm is not safisfactory performance in uneven illumination and is not real-time implementaion, as shown in Fig. 3. Ottaviani adopt a modified version of the Niblack algorithm [8], in which the averaged grey level of a neighbourhood of a given point is used to set a threshold for that point.

This method occpuy large execution time. Ohbuchi[9] propose a global threshold method. First he divided the center 60*60 area of 320*240 image into nine blocks. Then caculate the gray histogram for each block, and sort the gray value. The middle value is choosed as the threshold of each block. Finally the smallest value of these middle value is the global threshold of this whole image. This method existed two question: (1) The QR Code symbol must be in the center of the captured image,otherwise the method will failured when the QR Code symbol in the corner of the captured image. (2) This method result in excessive segmentation. Separate a part of barcode image as background and lead to decode failure. The locally adaptive thresholding methods require more space and high speed computer, but the barcode recognization is embedded in a small hardware system with constraints resource, so it is not used in barcode binarization. It is difficult to binarize the bar code in various illumination using one method. An adaptive multi-level thresholding algorithm is purposed, which integrate the local threshold with global threshold. The algorithm can achieve higher recognition rate under the condition of lower illumination, contrast and uneven illumination. This method including following steps. Firstly, caculate the histogram of gray image. In order to decreasing the effect of noise, filter the histogram, and analysis the feature of histogram peak. If the filtered histogram is bimodal distribution, the lowest of trough or the middle value of flat trough will be used as the global threshold. In common light conditions, this global threshold is used to binarizing image and its result is satisfied. If the histogram is single peak histogram, and single peak area in lower gray area, it means that barcode image is in weak illumination, otherwise the barcode image is in strong illumination, we adopt iterative thresholding method, which form the threshold with mean between old global threshold and center of dark area or light area. If histogram shows multipeak distribution, that means the image is in the case of uneven light conditions or complex background. The local threshold algorthm is used. The multi-level thresholding method integrate global thresholding and local thresholding method, it is meeted the real-time binarization in common lighting condition, and also satisfied the binarization in special illumination condition. 3.3. Determine the location and orientation Locate the finder patterns is premise of getting version, orientation and distortion of QR Code. There are three identical position detection patterns located at three of the four corners of QR Code. Three dark-lightdark squares are overlapped in every finder pattern, and the dark-light ratio is 1:1:3:1:1, as shown in Fig. 2. There is the off chance that similar graphic existed in symbol. So the approximately ratio area should be quickly find. Determine the orientation of symbol after getting the location of finder patterns. QR Code can be readable from any direction from 360 degree, so rotated symbol is oriented commonly by sine and cosine transformation, for example the reference algorithm of national standard [2]. Rotated symbol first, then implement interpolation operation. The amount of calculation is great and is not accurately in this algorithm. A modular distance offset algorithm was used without rotating symbol. After Locate the orientation of symbol, the center of three finder patterns formed a triangle, as shown in Fig. 4. By adopting the Law of cosines, the largest angle is obtained (Point0), and it is the upper left center point of finder pattern before rotated symbol. Take this point as coordinate origin, upper right (Point1) and down left (Point2) position detection pattern can be determined based on the distributing of the other points in this coordinate. Fig. 4. Locate QR Code orientation 3.4. Locate the central coordinates of alignment patterns In order to correct the contorted QR Code symbol, there are many alignment patterns in symbol. Increased the version of QR Code can result the number of alignment patterns added. Link the central point of the alignment patterns and three position detected patterns, the small sampling grid is formed. In small sampling grid, distortion is overcome. Therefore, locate the central coordinates of alignment pattern is critical for recognition barcode. According to the method that estimates before, accurately location after, we can find the central coordinates of alignment patterns. Used the known alignment patterns and detection patterns can estimate the central coordinate. In International standard [1] of QR Code, a reference method that locates the central coordinates of alignment patterns is provided. This

method scan the outline of the white square in alignment patterns starting from the pixel of the provisional central coordinate to find the actual central coordinates Xi and Yj, as shown in Fig. 5(a). The precondition of this method is estimated the central coordinate just inside of the alignment patterns. But a large of actual captured image are tested, the probability of estimated central value inside of the alignment patterns is only 70%. So the other 30% image will be location failure with this method. A new estimated method is provided which used eight directions of the estimated point. Assumption the estimated central point is A, as shown in Fig.5 (b). From point A, scan the nearly eight directions to find the central coordinate of alignment patterns which is satisfied condition. If find the central point (example point E), the method would successfully end. This method expands the scanning range, and 99.3% captured QR Code image is successfully located. Fig. 5. Find the central coordinates of alignment patterns 3.5. Decode The decoding process is the last step of recognition barcode, and it just reverse of the encoding procedure. The decoding steps can reference to international standard [1]. 3.6. Implement in Embedded System This application is implemented in our test hardware architecture. An ARM 920T processor core of Motorola MC9328MX1 is run at up to 200MHz. In addition to the processor core, its associated caches and memory management units, the ARM-based Excalibur devices include additional internal 128K SRAM and 16M FLASH memory, peripherals including camera interface (CMOS with resolution of 640*480) and LCD controller etc., extendable 64M external memory controllers, and JTAG interfaces for software debug. The barcode image processing algorithm is coded by the full assembler code to execute in real-time. 4. Experimental results 4.1. Binarization results In this section, total 70 unconstrained QR Code barcode image were tested to verify the various binarization methods. All original images are acquired by mobile phone embedded camera system. The images captured have a resolution of 640*480 with CMOS device. The experiments were done in real conditions. All kinds of illumination conditions were applied to QR Code image. The multi-level binarization results were compared with those obtained using four other techniques: Otsu s algorithm [7], the reference algorithm of QR Code standard [1], Modified version of Niblack s method [8], and Ohbuchi s method [9], as shown in Fig. 3. In Fig. 3 (a1), the original image is captured by common lighting condition. In Fig. 3 (a2) shows the image is captured by uneven illumination. In Fig. 3 (a3) shows the image is captured by weak illumination. The binarization result of Otsu s algorithm is showed in Fig. 3(b); the binarization result of the reference algorithm of QR Code standard is showed in Fig. 3(c); Fig. 3(d) shown the gray histogram of the image which is processed by gray conversion; the binarization result of Modified version of Niblack s method is showed in Fig. 3(e); the binarization result of Ohbuchi s method is showed in Fig. 3(f). The experimental results are summarized in Table 1. In the multi-level thresholding method, there are three kind of execution time corresponding to processing step. The 81.4% image can be binarized with once global thresholding, 15.7% image need secondary thresholding selection, and 0.028% image need locally thresholding method. From Table 1, we found that the multi-level thresholding method has satisfactory recognition rate and execution time. Table 1. The binarization method comparison Binarization method Recognition rate Execution time (ms) Reference algorithm of QR Code Standard 80% 36 Otsu s method 90% 50 Modified version of Niblack s method 93% 1080 Ohbuchi s method 85% 25 35(81.4%) Our method 38(15.7%) 99.8% 52(0.028%) 4.2. Recognition test

In order to confirm the effectiveness of the proposed recognition method, which including multilevel thresholding algorithm, determination of the location and orientation of finder pattern, located alignment patterns from eight directions, and decoding, we evaluated it with the whole recognition performance. For the evaluation, we captured more than 70 barcode image and run recognition algorithm taken by our test hardware. The recognition results were compared with two other techniques: the reference algorithm of QR Code standard [1], and Ohbuchi s method [9]. The experimental results are summarized in Table 2. Experiments have shown that over 98% of the captured barcode image can be successfully recognized with the automatic recognition method. Higher recognition rate was obtained with our algorithm as compared that with other methods. Table 2. Compare of different algorithms Binarization time (ms) Total recognition time(ms) Recognition rate Reference method of standard 40 90 75% Ohbuchi s method 20 60 83% Our method 30 70 98% [3] Z. Chi, K.W. Wong, A two-stage binarization approach for document images, Proceedings of 2001 International Symposium on Intelligent Multimedia, Video and Speech Processing, 2001, May 2-4, pp. 275-278. [4] P.K. Sahoo, S. Soltani, and A.K.C. Wong, A survey of thresholding techniques, Computer Vision, Graphics, and Image Processing, 1988, vol. 41, pp.233-260. [5] I.J. Kim, Multi-Window binarization of camera image for document recognition, Proceedings of the 9 th Int l Workshop on Frontiers in Handwriting Recognition, 2004, Oct. 26-29, pp.323-327. [6] O.D. Trier, Goal-directed evaluation of binarization methods, IEEE PAMI, 1995, Vol. 17. No. 12, pp.1191-1201. [7] N. Otsu. A threshold selection method from gray-level histograms, IEEE Trans. Systems, Man and Cyernetics, 1979, vol. 9, no. 1, pp. 62-66. [8] E. Ottaviani, et al, A common image processing framework for two-dimensional barcode reading, Seventh International Conference on Image Processing and its Applications, 1999, 2, pp. 2652-655. [9] E. Ohbuchi, et al, Barcode readers using the camera device in mobile phones, Proceedings of the 2004 International Conference on Cyberworlds, 2004, 11, pp. 260-265. 5. Conclusions As the mobile phone with camera device is getting more popular, recognition barcode based on embedded system is getting more important and practical. We proposed a new high-speed, high-accuracy automatic recognition method for recognizing QR Code in various illumination conditions. And there is no need the special scanner for barcode recognition in the proposed method. From the experiment, the proposed method produced better results than other method. The recognition test also showed the proposed method is effective for the QR Code image recognition based on embedded system. Acknowledgment I would like to thanks professor Mingye Liu, Dr. Zhenhong Shang for his guidance during the course of this work in ASIC Laboratories of BIT. References [1] ISO/IEC 18004:2000. Information technology-automatic identification and data capture techniques-bar code Symbology-QR Code, 2000. [2] GB/T 18284-2000. National standard of the People s Republic of China: Quick Response Code (in Chinese), Issued by China State Bureau of Quality and Technical Supervision, 2000.

(a1) (b1) (c1) (d1) (e1) (f1) (a2) (b2) (c2) (d2) (e2) (f2) (a3) (b3) (c3) (d3) (e3) (f3) Fig. 3. Binarization results (a) Original image; (b) Binarization image by Otsu s method; (c) Binarization image by reference algorithm in standard QR Code; (d) Gray histogram; (e) Binarization image by Ohbuchi s method; (f) Binarization image by multi-level thresholding method.