登录

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

注册

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

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 物流管理与工程类 > 物流工程 > 正文

基于机器视觉的商品条码Z尺寸测量毕业论文

 2021-04-05 04:04  

摘 要

商品条码对于商品的高效流通发挥着至关重要的作用,条码的印刷质量直接影响着条码的读取速度,如今针对条码图像的质量检测技术也得到了广泛的研究。传统的条码检测仪都是基于激光扫描技术,成本较高且需要人工参与,使用机器视觉技术可以对条码信息进行在线检测从而降低成本。因此,本文利用高分辨率的条码与尺子照片,通过图形图像处理的方法,测量条码的Z尺寸参数。

本文选用EAN-13条码作为检测对象,完成了以下工作:

  1. 通过智能手机获得条码与尺子图片后,使用MATLAB对图片进行预处理,包括灰度化处理、中值滤波法去噪处理、Otsu最大类间方差法二值化处理。预处理后对二值图像使用索贝尔算子得到图像轮廓,再经过一系列形态学处理使条码与尺子部分成为图片中最大的两块矩形区域并剪切下来;
  2. 利用霍夫算法分别检测条码照片部分和尺子照片部分的直线,并对这些直线的倾斜角度进行统计学处理得到条码倾斜角度,逆时针旋转校正条码照片与尺子照片;
  3. 将校正后的条码照片二值化处理后,生成只有0和1的矩阵,在矩阵中循环扫描得到一组代表条码长度的数据,均值处理后得到条码长度对应的像素值。
  4. 将校正后的尺子利用霍夫变换法找到多条刻度直线,记录这些直线的横坐标数据,对数据进行处理得到1mm对应的像素值。与条码长度像素值换算得出条码Z尺寸。

在最后本文选取了1张待检测条码照片进行实验,通过图像处理得到其Z尺寸,再使用精度较高的尺子测量其真实Z尺寸,计算误差。经过实验发现误差为1.06%,检测结果可信,有一定的可行性。

关键词:条形码Z尺寸,机器视觉,MATLAB图像处理。

Abstract

Barcode plays an important role in the efficient circulation of commodities. The printing quality of bar code directly affects the reading speed of bar code. Now, the quality detection technology of bar code image has also been widely studied. The traditional bar code detector is based on laser scanning technology, which is expensive and needs manual participation. Machine vision technology can be used to detect bar code information online to reduce the cost. Therefore, in this paper, the Z size parameters of bar code are measured by using high resolution bar code and ruler photos, and the method of graphic and image processing is used to measure the Z size parameters of bar code.

The EAN-13 bar code is used as the detection object, and the following work is completed:

(1) after obtaining bar code and ruler pictures from smart phone, MATLAB is used to preprocess the images, including grayscale processing, median filtering denoising and otsu maximum inter-class variance binarization. After preprocessing, the image outline is obtained by Sobel operator, and then the bar code and ruler part become the two largest rectangular regions in the picture and cut down after a series of morphological processing.

(2) the straight lines of the bar code photo part and the ruler photo part are detected by Hoff algorithm, and the tilt angle of these lines is statistically processed to obtain the bar code tilt angle, and the barcode photos and ruler photos are corrected by counterclockwise rotation.

(3) binarizing the corrected bar code photo, generating a matrix with only 0 and 1, circularly scanning in a matrix to obtain a group of data representing the length of the bar code, and obtaining the pixel value corresponding to the bar code length after the mean processing.

(4) the corrected ruler is used to find multiple calibration lines by Hoff transformation method, and the transverse coordinate data of these lines are recorded, and the pixel values corresponding to 1mm are obtained by processing the data. The Z size of bar code is obtained by converting it with the pixel value of bar code length.

At the end of this thesis, a bar code photo to be tested is selected to carry out the

experiment, and its Z size is obtained by image processing, and then the real Z size is measured by a ruler with high precision, and the calculation error is calculated. The experimental results show that the error is only reliable and the detection results are feasible.

Keywords: bar code Z size,machine vision,MATLAB image processing.

目录

第1章 绪论 1

1.1 选题背景和意义 1

1.2 国内外研究现状 2

1.3 本文研究内容 3

1.4 论文章节安排 5

第2章 条码Z尺寸检测原理 6

2.1 EAN-13条码组成 6

2.2 Z尺寸定义 6

2.3 Z尺寸计算原理 7

2.4 本章小结 8

第3章 图像预处理与目标分割 9

3.1 图像预处理 9

3.1.1 灰度化 9

3.1.2 二值化 10

3.1.3 去噪声 11

3.2 边缘检测 13

3.2.1 索贝尔边缘检测 13

3.2.2 坎尼边缘检测 14

3.3 形态学处理 15

3.4定位与裁剪 16

3.5本章小结 17

第4章 图像校正与尺寸获取 18

4.1 霍夫变换直线检测 18

4.2 旋转校正 19

4.3 尺寸获取 19

4.3.1 条码长度测量 20

4.3.2 尺子长度测量 20

4.4本章小结 21

第5章 实验与结果分析 22

5.1 原始照片处理实验 22

5.2 尺寸测量实验 26

5.3 结果分析 27

5.4 经济可行性分析 27

5.5 本章小结 28

第6章 总结与展望 29

参考文献 30

致谢 32

第1章 绪论

1.1 选题背景和意义

条形码是根据某种特殊的编码规则,由宽度不同的条和空排列组成的,条码实质上就是一个传递商品或者编号或者其他信息的图形[1]。条形码的应用日益广泛,数据采集和信息处理的速度由于条形码技术的发展大大提高。条形码是一种十分重要的信息载体,它是条码自动识别技术的基础,其印刷质量直接影响条形码自动识别系统的操作效率。因此,对条形码的印刷质量进行检测是很重要的环节,针对条码的质量检测技术也得到了业界广泛的研究。

条形码的质量检测项目有强制检测项目和推荐检测项目两种,其中强制检测项目有参考译码、可译码度、最低反射率、符号反差、最小边缘反差、调制比、缺陷度、符号等级、译码正确性、空白区宽度和宽窄比,推荐检测项目有Z尺寸、条高和印刷位置[2]

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

企业微信

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