datamatrix编解码技术的研究与实现Word格式.docx
《datamatrix编解码技术的研究与实现Word格式.docx》由会员分享,可在线阅读,更多相关《datamatrix编解码技术的研究与实现Word格式.docx(6页珍藏版)》请在冰豆网上搜索。
多种编码技术并且探讨了Reed-Solomon纠错码的应用。
接着本文研究了DataMatrix
条码预处理、条码检测、条码识别技术和译码原理。
在识别条码前首先在图像中过
滤掉图像的背景噪音增强条码可检测性本文运用了灰度均衡化、中值滤波和二值化
等多种图像预处理方法。
条码检测是一个十分重要的步骤根据DataMatrix条码图像
特征本文提出一种基于子区域的多特征分析的条码检测算法。
在初步定位的基础上
针对DataMatrix条码具有较强的方向性本文提出一种基于DataMatrix条码“L”边方向
特征的检测算法。
在条码识别方面本文研究并提出了一种基于DataMatrix条码图像
C/C语特征的透视纠正算法。
经过大量实验验证透视纠正算法效果很好。
本文使用
言实现了上述编码解码方案和检测识别算法并且设计了能用于多平台的DataMatrix
二维条码编码和解码的SDK。
经过详细的测试运行效果表明该SDK具有较好的性能。
关键词二维条码DataMatrix条码检测条码识别透视纠正DataMatrix编解码技术的研
究与实现iiAbstractWiththedevelopmentofcomputertechnologythetechnologyof
two-dimensionalbarcodehasbeenwidelyappliedtologisticsindustryautomatedproductioninternationaltradeelectroniccommerceandsoon.AsonekindoftwodimensionalbarcodetheDataMatrixCodehaslargeinformationcapacitysmallareaanti-counterfeitandcontaminationresistancewhichdemonstratesthesuperiorityintheareaoftheinformationacquisitiontheinformationstorageandtheinformationreading.ThispaperanalyzesthecharacteristicsoftheDataMatrixCodefirstlytheencodingtechnologyincludingASCIIC40TEXTetc.anddiscussestheapplicationofReed-Solomonerror-correctingcodes.Thenthispaperresearchestheimagepreprocessingbarcodedetectionbarcoderecognitionanddecodingtheory.Beforebarcoderecognitionweshouldfilterthenoiseinthebarcodeimagetoenhanceitsdetectability.Thispaperusesmanyimagepreprocessingmethodssuchasgrayleveltransformationmedianfilterandbinarization.Barcodedetectionisaveryimportantstep.AccordingtothecharacteristicsoftheDataMatrixbarcodethispaperpresentsanovelalgorithmofbarcodedetectionbasedonmultiplefeaturesanalysisofsubregions.IntheareaofbarcoderecognitionthispaperpresentsanewalgorithmofperspectivecorrectionbasedonthefeaturesofDataMatrixbarcode.Andafteralotofexperimentsperspectivecorrectionalgorithmworkswell.ThispaperusestheC/Cprogramminglanguagetoachieveasystemthatincludestheencodinganddecodingprogramsthedetectionalgorithmandrecognitionalgorithm.AndthispaperdesignsaSDKtoencodeanddecodeDataMatrixCodewhichcansupportVC/VB.Net/Delphietc..TheSDKhasalreadybeenusedinexperimentalunit.Theresultscertifyitsexcellentperformance.Keywords:
Two-dimensionalbarcodeDataMatrixBarcodedetectionBarcoderecognitionPerspectivecorrection南京航空航天大学硕士学位论文v图表清单图1.1常见二维
条码种类.............................................................................................................2图2.1
DataMatrix二维条码的外观10.........................................................................................8图2.2DataMatrix条码标准体
系..................................................................................................8图2.3DataMatrix条码
结构示意图...........................................................................................9图2.4DataMatrix
条码码制图10................................................................................................10图3.1
DataMatrix编码系统框架图............................................................................................13
图3.2GF256中元素的线性反馈移位寄存器
1055.............................................................18图3.3纠错码字电路
1055...........................................................................................................18图3.4八位码
字摆放顺序10......................................................................................................19图3.5
码字放置顺序10..............................................................................................................19
图3.6典型的32X32校正图形模块
10.....................................................................................20图3.78×
8数据矩阵和模块排
放位置图10................................................................................21图3.8“123456”条码图
像生成过程............................................................................................21图3.9条码识
3.10别业务模型6.......................................................................................................22图
DataMatrix条码编码Demo演示界面..........................................................................23
图3.11DataMatrix条码Demo编码效果
图..............................................................................24图3.12从文件中读入信息编
码.................................................................................................24图3.13在背景图上生
成条码.....................................................................................................25图4.1DM条码
译码系统框架图................................................................................................26图4.2
条码图像预处理框架图...................................................................................................27
图4.3彩色DM条码图像灰度化处
理......................................................................................27图4.4灰度均衡函数
图...............................................................................................................28图4.5DM条
码灰度均衡化处理................................................................................................29图4.6
灰度均衡化前后灰度直方图对比...................................................................................29
图4.7不同尺度参数的高斯函数分布曲线
60..........................................................................30图4.8高斯滤波后效果
图...........................................................................................................31图4.9中值滤波
后效果图...........................................................................................................31图4.10
图像二值化处理效果图.................................................................................................33
图4.11DataMatrix条码定位框架
图..........................................................................................33DataMatrix编解码技术的
研究与实现vi图4.12条码初步定位算法流程
图.............................................................................................34图4.13图像灰度化和中
值滤波处理效果图..............................................................................34图4.14基于子
区域对比度准则筛选区域.................................................................................35图4.15
经过筛选后的条码区域.................................................................................................36
图4.16在融合区域内利用Roberts算子获得条码边缘图
像..................................................37图4.17根据边缘信息强度筛选区
域.........................................................................................37图4.18连通区域补
偿.................................................................................................................39图4.19Hough点与线的对偶性..................................................................................................39
图4.20直角坐标系到极坐标系变
换.........................................................................................40图4.21DM条形码方向特征......................................................................................................40图4.22在0?
90?
角度范围内对条码进行投影........................................................................41图4.23Hough变换检测条码的位置信息..................................................................................42
图4.24DM条码透视变换框架
图..............................................................................................43图4.25图像基本几何变换矩阵68............................................................................................43图4.26透视变换经典算法63....................................................................................................44图4.27透视纠正流程图.............................................................................................................45
图4.28DM条码顶部斜边透视纠正示意
图..............................................................................46图4.29双线性插
值.....................................................................................................................46图4.30透视纠正效果实验图.....................................................................................................46图4.31实验二维条码透视纠正效果
图.....................................................................................47图4.32译码流程
4.33单图.....................................................................................................................47图模块和多模块条码图像10........................................................................................48图4.34将获得的透视纠正后的图像栅格
化.............................................................................49图4.35将条码转换为数据矩阵.................................................................................................49图4.36多种背景下的DM码检测............................................................................................51图4.37多条码的检测.................................................................................................................51图4.38对复杂背景的图像的识读.............................................................................................52
图4.39对多个条码图像的识
读.................................................................................................52图4.40对产生几何畸变和透视失真的图像的识读..................................................................53图4.41光照不均图像的识度.....................................................................................................53图4.42对破损和污染严重的图像的识
读.................................................................................53图5.1DataMatrix测试图像........................................................................................................56南京航空航天大学硕士学位论文vii图5.2VB平台下调用SDK实验结果
图...................................................................................58图5.3C平台下调用SDK实验测试图像....................