登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 计算机类 > 计算机科学与技术 > 正文

条形码识别技术研究与实现毕业论文

 2021-11-06 20:07:32  

摘 要

目前普遍使用的条形码检测设备,如条码扫描枪、手机等,能快速且准确地对平面包装上的平面条形码完成识别工作,但对于曲面包装上的曲面条形码,往往需要特定的检测设备及技术才能够完成识别工作。对此,本文以国内广泛使用的EAN-13条码为研究对象,对曲面条形码识别技术基于双目视觉和图像处理进行研究并实现。

基于双目视觉和图像处理的曲面条形码识别主要包含图像拼接和条码识别这两部分的内容:

第一部分是条形码左图像和右图像拼接。首先由双目摄像机获取曲面条形码的左右两部分图像,这是系统的前提条件。采用ORB算法获取两张条码图像的匹配点,得到匹配点才能知道两张图像中的相同位置。为了得到更准确的匹配点,使用Lowe算法对匹配点进行过滤,将错误匹配点剔除。使用RANSAC算法对匹配点进行筛选从而获得用于透视变换的匹配点,根据这些匹配点对右图像做透视变换。将左图像和透视变换后的右图像进行平移操作,得到大致的拼接图像。使用加权平均融合算法对拼接重叠部分做平滑过渡,从而得到完整的拼接图像。

第二部分是条码提取和识别。图像中的条形码可能存在一定程度的倾斜,针对这种情况,在提取条形码之前,需要对拼接后的图像做一个倾斜校正。使用Canny边缘检测算法检测出条形码的条纹的边缘线条,再使用Hough直线检测算法检测出边缘线条中的直线,通过计算直线的倾斜角度后可对图像做校正工作。在条形码提取工作中,先对校正后的图像做灰度处理,然后使用Sobel算法求灰度图像在X方向的灰度梯度差,得到条形码前景和背景有所分离的图像。之后对图片进行高斯滤波操作、二值化操作、闭运算操作、腐蚀膨胀操作等一系列处理流程即可得到条形码。最后借助开源识别库ZXing完成对条形码的识别。

通过文中方法实现的曲面条形码识别系统,对50张曲面条形码图片进行检测识别,均能完成质检,并且识别速度很快。实验结果表明了文中方法的可行性、有效性、可靠性,对条码识别领域中的曲面条码识别技术的提高也有一定的参考意义。

关键词:条码识别;图像拼接;条码定位;图像处理

Abstract

At present, the commonly used bar code detection equipment, such as bar code scanning gun, mobile phone, etc., can quickly and accurately identify the plane bar code on the plane packaging, but for the curved bar code on the curved surface packaging, special detection equipment and technology are often needed to complete the identification work. In this paper, the widely used EAN-13 bar code is taken as the research object, and the recognition technology of curved bar code based on binocular vision and image processing is studied and realized.

Surface barcode recognition based on binocular vision and image processing mainly includes two parts: image mosaic and barcode recognition:

The first part is the splicing of left and right barcode images. Firstly, the left and right images of curved bar code are acquired by binocular camera, which is the precondition of the system. Using orb algorithm to get the matching points of two barcode images, we can get the matching points to know the same position of the two images. In order to get more accurate matching points, Lowe algorithm is used to filter the matching points and eliminate the wrong matching points. The RANSAC algorithm is used to filter the matching points to obtain the matching points for perspective transformation, and perspective transformation is performed on the right image according to these matching points. The left image and the perspective transformed right image are translated to get the approximate mosaic image. The weighted average fusion algorithm is used to make smooth transition for the overlapped parts of the mosaic, so as to obtain the complete mosaic image.

The second part is barcode extraction and recognition. There may be a certain degree of skew in the barcode of the image. In this case, before extracting the barcode, it is necessary to make a skew correction for the spliced image. Canny edge detection algorithm is used to detect the edge line of bar code stripe, and Hough line detection algorithm is used to detect the line in the edge line. The image can be corrected by calculating the tilt angle of the line. In the work of bar code extraction, the gray level of the corrected image is processed first, and then the gray level gradient difference of the gray level image in X direction is calculated by Sobel algorithm, and the image with separated foreground and background of bar code is obtained. After that, the bar code can be obtained by a series of processing procedures, such as Gaussian filtering operation, binary operation, closed operation, corrosion expansion operation, etc. At last, we use zxing to identify the bar code.

Through the surface bar code recognition system realized by the method in this paper, 50 pieces of surface bar code pictures can be detected and recognized, which can complete the quality inspection, and the recognition speed is very fast. The experimental results show the feasibility, validity and reliability of the proposed method, which also has some reference significance for the improvement of curved bar code recognition technology in the field of bar code recognition.

Key Words:Barcode recognition;Image splicing;Barcode positioning;Image processing

目 录

第1章 绪论 1

1.1 课题研究的背景及意义 1

1.2 国内外研究现状及前景 2

1.3 课题研究内容 3

第2章 基础理论及关键技术概要 5

2.1 EAN-13条码原理 5

2.2 图像配准技术 7

2.3 图像融合技术 9

2.4 条码定位技术 10

第3章 双目视觉图像拼接 11

3.1 图像配准 11

3.1.1 特征点提取 11

3.1.2 特征点描述 12

3.1.3 特征点匹配及筛选 13

3.2 图像透视变换 14

3.2.1 单应矩阵 14

3.2.2 透视变换 15

3.3 图像拼接及融合 17

第4章 条形码图像识别 19

4.1 图像倾斜校正 19

4.2 目标条码提取 21

4.3 条纹宽度判别 23

4.4 条码识别及校错 26

第5章 系统设计及结果分析 28

5.1 系统设计及工作流程 28

5.2 实验结果分析 31

第6章 总结与展望 34

参考文献 36

致谢 37

第1章 绪论

1.1 课题研究的背景及意义

条形码由黑白两种宽度不等的平行条纹按照事先规定好的编码规则排列而成,同时还会在条码底部添加一些供人识别的符号语言。条形码能够记录一些具有标识性或是较为简短的信息,并具有易于识别、准确可靠、造价便宜、灵活实用等优点[1]。基于这些优点,条形码得以在全世界范围内被广泛使用,尤其是被应用于商品流通、物流管理[2]、仓库管理、电子支付[3]等领域。条形码的应用程度已使它成为了众多领域中不可或缺的存在。

当前世界范围内流通的条形码众多,主流的有两种,UPC条形码(图1.1)和EAN条形码(图1.2)。前者由美国制定标准,并分为UPC-A条形码和UPC-E条形码这两种条码类型,应用范围主要集中在美国和加拿大这两个国家。后者由欧共体根据UPC标准而制定,同时也分为EAN-8条形码和EAN-13条形码这两种条码类型,其流通范围之广,通用于世界各地。国内以使用EAN-13条形码为主,尤其是流通中的商品,都会有EAN-13条形码标签,并且国内还有相应的机构对其进行监督管理,确保其规范和流通。

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图