图像中的字符检测与识别

 2022-02-07 09:02

论文总字数:21996字

摘 要

随着自动化工业技术的发展,机器视觉在工业生产中得到了成功应用,也有着日趋重大的影响力,如对生产线上的工件进行定位等。但由于工业的现场环境恶劣、光照不均等因素的影响,会使工件图片产生失真、模糊、含噪、字符存在粘连或缺失、图象灰度不均匀等问题。本文针对这些问题,对工业现场的图象中的字符检测与识别进行研究,通过matlab提出了一种字符识别的算法。

首先,本文简单论述了字符识别的研究背景以及国内外当前最先进的的研究情况,对字符识别的相关基础知识进行了阐述。字符识别主要包括字符定位、字符分割、字符识别等步骤。其中,文本行分割为本算法的核心算法,将在其后进行详细描述。

其次,在对工件编号进行定位之前,首先先对工业现场的图片进行增强、灰度化和二值化,定位分为预定位和定位,先定位出编号的可能的位置,画出一片小的区域,然后再在这个小区域中选择面积最大的文本,作为识别的对象。

最后,在定位之后,对文本行进行垂直投影,分析图象中的峰值和谷值的意义和相关信息,然后根据工件编号的特征,对该字符行进行分割,分割之后再基于卷积神经网络对其进行识别,最后输出算法的识别结果。

经过matlab的实验仿真结果显示,该算法具有普遍的适用性和良好的鲁棒性,因此,算法是具有一定的理论研究价值和实用价值的。

关键词:字符识别、matlab、图象预处理、二值化、字符分割、投射分割、卷积神经网络、CNN

character detection and recognition in a image

Abstract

With the development of industrial technology, automation technology plays an increasingly important role in industrial production. Machine vision which has been successfully applied, such as the work on the production line positioning. But because of the harsh environment of industrial site, uneven illumination and other reasons, cause the workpiece image is distorted, fuzzy, noisy, character presence or absence of adhesions, uneven gray image and other issues. The author that is, for these problems, proposes a character recognition algorithm for the characters in the industrial field in the image detection and recognition study by matlab.

Firstly, the article introduces the background and the current status of research character recognition, and then the basic knowledge of character recognition were expounded. Character recognition includes text line positioning, text line segmentation and text line recognition. Among them, the part text line segmentation algorithm is the most important part of all the algorithm, and will be described in detail later.

Secondly, before the number of the workpiece positioning, image enhancement, grayscale and binary, predetermined positioning and positioning should be done at first. Draw a small region of the numbers’s possible position, and then in this small area, select the largest text, as the final objects.

Finally, after license plate location, the next step is eliminating the region of the image, analysis the information of peaks and valleys of the image, and then according to the features of the workpiece number text lines split, split again after convolutional neural network based on its identification, recognition result the final output of the algorithm.

After matlab simulation experiments, the algorithm has a good effect, therefore, the algorithm has some theoretical studies and practical value.

KEYWORDS: character recognition, matlab, image preprocessing, binarization, character segmentation, segmentation projection, convolution neural network, CNN

目录

摘要 I

Abstract II

第1章 绪论 1

1.1 研究背景及意义 1

1.2 字符识别相关知识 1

1.3 字符识别研究现状 2

1.4 论文的主要研究内容及论文安排 4

1.4.1 主要研究内容 4

1.4.2 论文安排 4

第2章 图象预处理 5

2.1 灰度图象光照不均衡处理 5

2.1.1 同态滤波 5

2.1.2 图象增强 7

2.2 图象二值化 9

2.2.1 灰度图象二值化 9

2.2.2 二值化图象膨胀 10

2.2.3 局部二值化 11

2.3 图象倾斜校正 11

2.4 本章小结 12

第3章 字符分割 13

3.1 基于投影法的字符分割 13

3.1.1 字符分割的基本思想 13

3.1.2 投射曲线的贪心修整 13

3.1.3 基于无监督聚合的字符分割 14

3.2 字符归一化 16

3.2.1 字符大小归一化 16

3.2.2 字符位置归一化 18

3.3 字符分割仿真结果及分析 18

3.4 本章小结 19

第4章 字符识别方法 21

4.1 卷积神经网络 21

4.1.1 卷积神经网络的发展 21

4.1.2 卷积神经网络的结构 22

4.2 基于卷积神经网络的特征提取 25

4.2.1 CNN的训练 25

4.2.2 卷积特征提取 27

4.3 字符识别仿真结果及分析 28

4.3.1 开发环境 28

4.3.2 实验结果 28

4.4 本章小结 31

第5章 总结与展望 33

5.1 总结 33

5.2 展望 33

参考文献 34

致谢 36

绪论

研究背景及意义

如今,自动化生产线已经融入到工业生产的各个领域,包括机器制造业、食品、医药以及电子器件的生产线上,在中国的工业发展中占据着至关重要的地位。随着自动化产业发展逐步深入和扩大,机器视觉技术也越来越得到大众的关注,逐渐被应用到自动化生产领域。

字符识别方法技术是机器视觉的一个非常重要的研究方向。随着现代工业的迅速发展,因为工业现场的结构、环境和照明情况等一些因素可以得到非常严格的操控,机器视觉已经在工业的生产线和组装中得到了非常多的应用,例如对生产线上的工件进行定位和检测,对产品的表面形状例如凹陷或者凸起进行缺陷检验等等很多方面。这其中的很多情况都需要对字符进行检测和识别,例如,许多微小的电子元器件(如电阻、电容、电源、电位器、电子管、散热器、微特电机、电子变压器、继电器等)、集成电路板、一些大型的工件上都有字符用来编号或者编码,如果单用人眼来观测、识别这些字符,可能会出现以下两个问题:(1)无法满足生产自动化的要求;(2)由于大多时候编号或编码在工件上的位置并不利于人眼观察,所以极有可能因此而无法进行正确的识别。

剩余内容已隐藏,请支付后下载全文,论文总字数:21996字

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

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;