摘要
条码技术是一种融编码、印刷、数据采集和处理于一体的自动识别技术,条码又分为一维码和二维码,二维码除了具备一维码成本低、传播方便等优点外,还具有信息容量大、可靠性高、可表示多种形式数据、保密防伪性强等优点。论文首先通过分析多种二维码编码标准,总结了二维码编码技术的一般步骤,并对编码过程中的数据编码技术、纠错码生成和掩模技术进行详细分析。然后分析了基于图像处理的二维码解码算法的一般过程,并对图像预处理、二维码的定位与校正以及数据纠错过程中涉及到的关键算法进行分析比较。针对快速响应矩阵码(QR code),详细设计基于图像处理的QR码解码算法,为了降低算法复杂度并提高识别效率,改进了二维码图像的二值化算法和QR码定位算法,并对算法改进后的执行效率以及容错性能进行分析,结合算法执行时间分析结果对关键算法进行优化。实验结果表明,改进的QR码解码算法执行效率较高而且稳定,并且在光照不均、存在噪声以及图像变形等情况下均可以正确解码。随后针对二维码的应用特点,设计基于嵌入式的QR码识别系统,为了简化图像采集流程并精简系统,详细设计了基于S3C2440和OV7620的图像采集子系统。最后利用天嵌科技的TQ2440开发平台实现基于嵌入式的QR码识别系统,完成实时图像采集、循环接收用户解码请求、解码并返回结果等功能。
Barcode technology is an automatic identification technology that is consist of coding, printing, data acquisition and processing. Barcode can be divided into one-dimensional(1D) barcode and two-dimensional(2D) barcode,1D barcode has a lot of advantages, such as low cost and easy communication, while 2D barcode has large information capacity, high reliability, ability to express various forms of data, strong security, etc. Firstly, by analyzing multiple 2D barcode standards, summarize the general procedure of encoding technology, and detailed analyze the data coding technology, error correcting code generation method and mask technology. Secondly, analyze the 2D barcode decoding algorithm that is based on image processing, compare the different algorithms in the process of image pre-processing, positioning & adjustment and data correction. Then detailed design the decoding algorithm for QR code, improve the binarization algorithm for 2D barcode image and QR code positioning algorithm, and analyze the efficiency and fault tolerance of the improved QR code decoding algorithm. By analyzing the execution time of the decoding algorithm, find and optimize the key algorithms. The experimental results show that the improved QR code decoding algorithm is efficient and stable, and can identify the QR code image uneven illumination, with noise or deformation. Thirdly, design an embedded QR code recognition system in view of the specific application of 2D barcode. To simplify the process of image acquisition and the recognition system, design the image acquisition sub-system based on S3C2440 and OV7620 in detail. Finally, realize the embedded QR code recognition system on TQ2440, complete the function of real-time image acquisition, loop receiving user request for decoding, decoding with the result returned and some others.
引文
[1]中国物品编码中心,中国自动识别技术协会.自动识别技术导论[M].武汉:武汉大学出版社,2007.
[2]方卿,钱建国.论信息载体演进的替代与兼容[J].图书情报工作,2002.
[3]Eamonn O'Neill,Peter Thompson,Stavros Garzonis,Andrew Warr.Reach Out and Touch:Using NFC and 2D Barcodes for Service Discovery and Interaction with Mobile Devices[M].Pervasive Computing,2007,4480:19-36.
[4]Afzel Noore,Nikhil Tungala,Max M.Houck.Embedding biometric identifiers in 2D barcodes for improved security[M].Computers & Security,2004,23(8):679-686.
[5]Eisaku Ohbuchi,Hiroshi Hanaizumi,Lim Ah Hock.Barcode Readers using the Camera Device in Mobile Phones[M].International Conference on Cyberworlds,2004:260-265.
[6]Tsung-Yu Liu,Tan-Hsu Tan,Yu-Ling Chu.2D Barcode and Augmented Reality Supported English Learning System[M].Computer and Information Science,2007:5-10.
[7]Devi Parikh,Gavin Jancke.Localization and Segmentation of A 2D High Capacity Color Barcode[M]. Applications of Computer Vision,2008:1-6.
[8]Hsiang-Cheh Huang,Feng-Cheng Chang,Wai-Chi Fang.Reversible Data Hiding with Histogram-Based Difference Expansion for QR Code Applications[M].IEEE Transactions on Consumer Electronics,2011,57(2):779-787.
[9]Ankit Mohan,Grace Woo,Shinsaku Hiura,Quinn Smithwick,Ramesh Raskar. Bokode: Imperceptible Visual tags for Camera Based Interaction from a Distance[J].ACM Transactions on Graphics,2009,28(3).
[10]ISO/IEC 16022:2006.Data Matrix bar code symbology specification[S].
[11]ISO/IEC 18004:2006.Information technology-Automatic identification and data capture technology-QR code 2005 bar code symbology specification[S].
[12]ISO/IEC 15438:2006.Information technology-Automatic identification and data capture techniques-PDF417 bar code symbology specification (second ed.)[S].
[13]GB/T 17172-1997.四一七条码[S].
[14]GB/T 18284-2000.快速响应矩阵码[S].
[15]SJ/T 11350-2006.二维条码紧密矩阵码[S].
[16]GB/T 21049-2007.中华人民共和国标准-汉信码[S].
[17]Microsoft.Microsoft Tag[EB/OL].http://tag.microsoft.com/home.aspx,2011-11-13.
[18]Robert H. Morelos-Zaragoza.纠错编码的艺术[M].北京:北京交通大学出版社,2007.
[19]章莉.连续型二维条码的容错技术与掩模方案[D].上海:复旦大学,2009.
[20]吴湛击.现代纠错编码与调制理论及应用[M].北京:人民邮电出版社,2008.
[21]冯克勤.纠错码的代数理论[M].北京:清华大学出版社,2005.
[22]孙丽华.信息论与纠错编码[M].北京:电子工业出版社,2005.
[23]百度百科.二维码[EB/OL].http://baike.baidu.com/view/132241.htm,2011-11-13.
[24]张建德,邵定宏.改进的基于彩色空间距离的图像灰度化算法[J].机械与电子,2008,(1):63-65.
[25]Milan Sonka, Vaclav Hlavac, Roger Boyle.图像处理、分析与机器视觉[M].北京:人民邮电出版社,2003.
[26]Xiong Zou,Guo-dong Liu,Jian-min Wang. Study on the Sequence of Steps in the QR Code Image Preprocessing[J].International Conference on Future Computer an Communication,2010,3:446-449.
[27]刘纪红,王铖媛.一种基于自适应阈值的图像二值化算法[J]. Chinese Control and Decision Conference,2009:3959-3962.
[28]孙少林,马志强,汤伟.灰度图像二值化算法研究[J].Value Engineering,2010:142-143.
[29]叶芗芸,戚飞虎,吴健渊.文本图像的快速二值化方法[J].红外与毫米波学报,1997,16(5):344-350.
[30]杨桂丽,高美凤.QR码图像二值化的研究[J].计算机工程与应用,2009,45(35):176-195.
[31]周利红,刘书家.QR码图像处理和译码方法研究[J].北京工商大学学报(自然科学版),2008,26(1):63-66.
[32]陈杰.QR码图像预处理技术研究[J].温州大学学报(自然科学版),2010,31(6):16-23.
[33]杨佳丽,高美凤.一种QR码的预处理方法[J].计算机工程,2011,37(2):218-220
[34]卫晋伟,戴曙光,穆平安.基于形态学和Hough变换的QR码校正与定位方法.电脑与信息技术,2010,10(6):32-35.
[35]Qiaoling Liu,Xiaochao Li,Mei Zou,Jun Zhou.The Multi-QR Codes Extraction Method in Illegible Image Based on Contour Tracing[J]. Anti-Counterfeiting, Security and Identification (ASID),2011,24:51-56.
[36]Yu-Hsuan Chang,Chung-Hua, Chu,Ming-Syan Chen.A General Scheme for Extracting QR Code from a non-uniform background in Camera Phones and Applications[J].Ninth IEEE International Symposium on Multimedia 2007,2007:123-130.
[37]Yunhua Gu,Weixiang Zhang.QR Code Recognition Based On Image Processing[J].International Conference on Information Science and Technology,2011:733-736.
[38]Elmoustava Ouldbarikalla,Wadih Sawaya,Yves Delignon,Bertrand Pladeau.New Algorithm for 2D Barcode Detection [J]. International Conference on Advanced Communication Technology,2009:1979-1981.
[39]Jiejing Zhou,Yunfei Liu,Peng Li.Research on Binarization of QR Code Image[J].International Conference on Multimedia Technology(ICMT),2010:1-4.
[40]Bleyl R L.Using Photographs to Map Traffic Accident Scenes:A Mathematical Technique[J] Journal of Safety Research,1976,1:59-64.
[41]Jia-peng Wu,Zhao-xuan Yang,Dong Han,Zhou-fu Bai,Yu-ting Su.2D Barcode Image Binarization Based on Wavelet and Otsu Method[M].Computer Engineering,2010, 36(10):190-192.
[42]Duckki Kim,Youngsong Mun.Design and Performance Analysis of Multimedia Techware Making System Using 2D Barcode[M].Computational Science and Its Applications,2006, 3981:195-203.
[43]Hiroko Kato,Keng T Tan.Development of a novel finder pattern for effective color 2D-Barcode detection[M]. Parallel and Distributed Processing with Application, 2008:1006-1013.
[44]井上诚喜等.C语言实用数字图像处理[M].北京:科学出版社,2003.
[45]Du-Ming Tsai,H.-T. Hou,H.-J. Su.Boundary-based corner detection using eigenvalues of covariance matrices[M].Pattern Recognition Letters,1999,20:31-40.
[46]Satoshi Suzuki.Topological Structural Analysis of Digitized Binary Images by Border Following[M].Computer Vision,Graphics,and Image Processing,1985,(30):32-46.
[47]Hanho Lee.High-Speed VLSI Architecture for Parallel Reed-Solomon Decoder[J].Very Large Scale Integration(VLSI)Systems,2003,11(2):288-294.
[48]SAMSUNG.S3C2440A 32位CMOS RISC微控制器用户手册[M].
[49]OmniVision.OV7620 Product Specifications-Rev.1.3(5/13/00)[M].
[50]Hiroko Kato,Keng T.Tan.Pervasive 2D Barcodes for Camera Phone Applications[M]. Pervasive Computing,2007,6(4):76-85.
[51]Micrium.μC/OS-Ⅱ Kernel[EB/OL].http://micrium.com/page/products/rtos/os-ii,2011-11.
[52]Munoz-Mejias David,Gonzalez-Diaz Ivan,Diaz-de-Maria Fernando.A Low-Complexity Pre-Processing System for Restoring Low-Quality QR Code Imgaes[J].IEEE Transaction on Consumer Electronics,2011,57(3):1320-1328.
[53]Theo Pavlidis.A New Paper/Computer Interface:Two-Dimensional Symbologies[J]. Proceedings.15th International Conference on Pattern Recognition,2000,2:145-151.
[54]Theo Pavlidis,Jerome Swartz,Ynjuun P.Wang.Information Encoding with Two-Dimensional Bar Codes[J].Computer,1992,25(6):18-28.