最新复杂背景下二维条码图像的研究识别

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

复杂背景下二维条码图像的研究识别

复杂背景下二维条码图像的研究识别

目录

摘要 ....................................................................................................................................................................I ABSTRACT..................................................................................................................................................... II 引言 . (1)

1 绪论 (2)

1.1课题研究背景和意义 (2)

1.2国内外研究现状 (3)

1.3本课题研究内容 (4)

2 图像的预处理 (5)

2.1图像灰度化 (5)

2.2图像滤波 (7)

2.2.1 图像滤波技术 (7)

2.2.2 高斯滤波 (7)

2.2.2 中值滤波 (8)

2.3二值化阈值选取 (9)

2.3.1 直方图的峰谷法 (9)

2.3.2 一维最大熵法 (10)

2.3.3 Otsu法 (11)

2.3.4 阈值算法的选取 (13)

2.4数学形态学操作 (13)

2.4.1 腐蚀 (13)

2.4.2 膨胀 (14)

2.4.3 开操作 (15)

2.4.4 闭操作 (15)

2.5最大连通分量提取 (15)

2.6本章小结 (16)

3 DM码定位 (16)

3.1边缘检测 (17)

3.1.1 Roberts算子 (17)

3.1.2 Sobel算子 (17)

3.1.3 log算子 (18)

3.1.4 边缘检测算子的选取 (18)

3.2H OUGH变换线段检测 (19)

3.2.1 Hough变换检测直线原理 (19)

3.2.2 Matlab 中的Hough变换 (20)

3.3图像校正 (20)

3.3.1 倾角计算 (20)

3.3.2 图像旋转 (22)

3.3.3 精确裁剪DM条码 (22)

3.4本章小结 (23)

4 MATLAB实验结果分析 (24)

4.1DM码识别 (24)

4.2DM码解码 (31)

4.3实验结果分析 (32)

4.4本章小结 (33)

5 结论与展望 (34)

致谢 (35)

参考文献 (36)

摘要

Data Matrix二维条码(DM码)的外观是一个由许多小方格所组成的正方形或长方形符号,其资讯的储存是以浅色与深色方格的排列组合,以二位元码(Binary-code)方式来编码,故电脑可直接读取其资料内容,而不需要如传统一维条码的符号对映表(Character Look-up Table)。

然而在实际的DM码采集工作中,因为各种因素的综合作用,采集到的图像质量并不如预期,而且不光只包含有DM码图案,还会混入其他各种背景,所以DM码图案所在图像有个比较复杂的背景。

针对以上问题,本文讨论了复杂背景下二维条码的识别,根据Data Matrix二维条码的特征,形成一个解决方案:使用图像滤波技术去除原图像噪声,Otsu算法对图像进行二值化,利用数学形态学对图像进行膨胀、腐蚀操作,然后确定最大连通区域,把条码图案分割出来,其次根据Hough变换检测出图像中的两条最长线段,也就是‘L’型特征图案,最后使用‘L’型特征图案,计算出条码的倾斜角度,对条码图像进行旋转,使其达到标准位置。

通过对多个有复杂背景的DM码的实验,该方案能够从复杂背景中分割出DM 条码区域,并且能够进行旋转校正。

关键词:Data Matrix;Otsu算法;Hough变换;图像旋转

ABSTRACT

The appearance of a two-dimensional bar code is a square or rectangular symbol which made up of many small squares, the information is stored in light and dark colored squares in some way, the computer can read the data directly in the two-dimensional code, without the need for the corresponding table of unified dimensional bar code symbol.

However, in the practice of DM code acquisition , because of various factors, the quality of image collected is not as good as expected ,it not only contains the DM code pattern, but also sneaks into a various of backgrounds, so the image of DM code pattern has a complicated background.

In view of the above problems, this paper discusses the recognition of 2D barcode

in complex background, according to the characteristics of two-dimensional bar code, the solution is as follows :firstly, wipe off the original image noise using Gauss filtering algorithm, binary images via Otsu algorithm, expand and deprive the images using mathematical morphology erosion operation, and then determine the maximum connected region, segment barcode pattern, secondly, test the two longest lines of images based on the Hough transform , that is the characteristics of "L" pattern, finally ,calculate the tilt angle of bar code using “L” type pattern , achieve the standard position via the rotation of bar code.

Through the experiment of many complex backgrounds of DM codes, the scheme can be segmented the DM bar code regions from complex background, and can achieve the standard position via rotation and correction

Keywords: Data Matrix; Otsu algorithm; Hough transform; image rotation

相关文档
最新文档