版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、精选优质文档-倾情为你奉上一种在线图像编码识别系统的设计摘要:本文介绍了在线图像编码字符识别系统的设计与实现过程,对其中重点环节进行了分析与研究,给出了主要环节问题的解决方法,在识别算法上,结合模板匹配与特征识别,提出了基于特征加权的模板匹配算法,该算法对提高字符识别率提到了较好的作用。关键词:图像处理;模式识别;特征加权;软件设计0引言图像编码字符识别的研究目前仍是国内外一个重点研究课题,它具有广泛的应用背景,比如车牌号码自动识别、邮政编码的自动识别、试卷自动阅读、报表自动处理等,由于这种在线图像编码字符的识别都具有一些共性,本文结合在线轮胎编码字符识别系统的设计,对一般图像编码字符识别系统
2、进行了阐述,对关键环节进行了研究与分析,该方法对其它在线图像编码字符系统的开发具有一定指导意义。1在线图像编码识别系统流程在线图像编码字符识别系统主要包括数字图像的采集、存储、图像预处理、编码图像提取、编码特征提取、编码识别和后续处理等一些环节,其流程图如图1所示。图像预处理后续处理编码特征提取与识别编码图像的采集与存储图1 在线图像编码字符识别系统流程图在线轮胎图像编码字符识别系统要求对通过生产流水线上每一个轮胎采集含有轮胎编码的图像,然后通过对图像的处理,提取出轮胎编码特征,采用合适的识别算法将每一位编码字符进行识别。由于轮胎编码字符在轮胎上有一定变形,且摄像角度不同,得到的编码图像差异也
3、很大,规律性差,所以编码图像的预处理和识别算法的选取显得尤为重要。2图像采集与存储在线编码图像通常使用数码摄像机、数码照相机、数码摄像头等设备采集并输入计算机进行处理,本系统采用QuickCamPro4000数码摄像头采集轮胎编码图像,直接按JPG格式存储。编码图像一般都要先转成BMP图像格式,因为BMP格式己经成为PC领域事实上的标准几乎所有为Windows操作系统设计的图像处理软件都支持这种格式的图像。BMP是Windows的原始位图格式,它可以用于保存任意类型的位图数据,可以支持所有的屏幕分辨率和Windows所支持的颜色组合。一般情况下,为了保证显示的高效率,它对图像数据没有任何的压缩
4、,所以一幅很小的位图就可能占据相当大的空间。BMP位图文件包括位图文件头、位图信息头、调色板、位图数据区四个部分,位图文件头由14个字节构成,位图信息头由40个字节构成,调色板的大小取决于色彩数,单色图像调色板占8个字节,16色图像调色板占64个字节,256色图像调色板占1024个字节,224色图像没有调色板,位图数据区内数据按行顺序自下而上、自左而右排列。3图像预处理图像预处理主要包括有:图像灰度化、图像降噪与增强、编码区边缘检测、图像几何校正、编码区图像提取、编码图像二值化、字符分割、字符归一化等。下面介绍几个关键环节的处理过程。3.1 图像灰度化处理编码图像通常是彩色的,实际识别用的图像
5、是灰度图,所在需要先将彩色编码图像转换为灰度图像。在RGB颜色模型中,如果R=G=B,则颜色(R,G,B)表示一种黒白颜色,其中R=G=B的值叫灰度值,灰度化处理就是使彩色的R、G、B分量值相等的过程。常用灰度化处理方法是加权平均值法,即R=G=B=(WRR+WGG+WBB)/3其中,WR、WG、WB分别是R、G、B的权值,实验和理论证明,当WR=0.3, WG=0.59, WB=0.11时,即当R=G=B=0.30R+0.59G+0.11B时,能得到最合理的灰度图像。3.2 图像增强处理3.2.1 直接灰度变换线性灰度变换:假设图像灰度是线性变化的,如原图像f(x,y)灰度范围为a,b,要求
6、变换后图像灰度范围达到c,d,根据线性规律,则变换后图像g(x,y)为: (1)非线性变换对数变换和指数变换。当需要扩展低灰度区、压缩高灰度区时使用对数变换,当需要扩展高灰度区时使用指数变换。3.2.2 平滑滤波降噪由于噪声对应图像中的区域边缘等灰度值具有较大较快变化的部分,属高频分量,所以使用低通滤波器(即平滑滤波器)降噪。同时平滑还可以使图像模糊,有利于在提取较大的目标前去除较小的细节或将目标内的小间断连接起来。平滑降噪的方法是使用模板对图像进行卷积运算,线性平滑滤波器最常用的模板是如图2所示的3×3模板,将此模板与图像中像素按如下方法进行卷积运算,可得到平滑降噪的图像。将模板在
7、图中漫游,并将模板中心与图中每个像素位置重合;将模板上系数与模板下对应像素相乘;将所有乘积相加;将和赋给图中对应模板中心位置的像素。非线性平滑滤波器最常用的是中值滤波器,它将区域中所有的值按大小进行排序,将排序后位于中间的像素值赋予中心像素。中值滤波可有效地去除随机噪声,能得到较好的视觉效果。3.3 编码区边缘检测边缘是灰度值不连续的结果,可利用求一阶和二阶导数的方法检测到。因为在边缘地带导数值大,而非边缘的地方导数值小。由于数字图像是离散的,不能求导数,可以通过卷积的方法用差分近似代替微分。效果较好的边缘检测算法是Sobel算子。Sobel算子是一种梯度幅值,分别利用垂直算子Sx、水平算子S
8、y来获取编码区垂直边缘和水平边缘,即在水平和垂直方向上使用如图3所示的两个不同的卷积模板,得到如图4所示的边缘检测结果。121000-1-2-1-101-202-101图2 平滑滤波器模板 图3 Sobel边缘检测模板 图4 Sobel算子边缘检测结果3.4 图像几何校正Hough变换可以检测出编码区图像倾斜角度,根据此角度进行旋转变换可使编码区图像得到校正。Hough变换可以将图像空间XY中的直线(y=px+q)检测问题转换到参数空间PQ中点的检测问题,在参数空间PQ里,建立一个累加数组Sum(p,q),对每一个图像空间中给定边缘点,让p取遍所有可能值,根据直线方程q=-xp+y计算出对应的
9、q,对Sum(p,q)进行累加,得到Sum(p,q)的值就是在(p,q)处共线的点的个数,(p,q)的值就是图像空间中直线的斜率和截距,由斜率得到图像编码区水平边缘角度。3.5 字符切割通过对编码字符区直接进行水平扫描,由字符间距一般可以将字符区域分割出来。也可以通过对编码字符区做垂直方向投影运算,根据字符大致宽度与字符总数,对字符进行切割。如图5所示是编码字符区及对应垂直投影图。 图5 编码字符及对应垂直投影 图6 线性插值示意图3.6 字符归一化处理对分割出的字符从四个方向扫描,确定字符边界,然后采用线性插值方法对每个字符作归一化处理,使每个字符归一为32×16点阵。图6为线性插
10、值示意图,根据线性原理,f(x1)可由公式(2)计算: (2)4识别算法设计字符识别一般采取特征判别或模板匹配的方法,特征判别是根据特征抽取的程度分阶段的、用结构分析的办法完成字符的识别。模板匹配即是根据字符的知识采取按形匹配的方法,模板匹配一般分为两类:一类是直接利用输入的二维平面图像与字典中记忆的图形进行匹配;另一类是抽出部分特征与字典进行匹配。轮胎编码图像中字符仅涉及部分英文字符和10个阿拉伯数字,字符较少,结构相对简单,因此具体识别时,既可以采用图形匹配的方法,也可以采用结构分析的方法。但由于轮胎上编码字符有一定变形,且有断裂现象,所以直接模板匹配与直接特征抽取方法识别率都不理想,本系
11、统使用了模板匹配与特征识别相结合的基于特征加权的模板匹配识别算法,其字符识别率比简单模板匹配算法和特征识别算法识别率都有不同程度的提高。基于特征加权的模板匹配识别算法基本思路是:给模板中有字符笔画的点分配不同的权重,位于笔画中心的点权重最高,位于笔画边缘的点权重最低,然后将样本模板与标准模板逐点模糊匹配,按模糊识别规则识别。 5结论本本文结合轮胎编码识别系统的实现对在线图像字符编码识别系统的设计进行了阐述,提出了一种模板匹配与特征匹配相结合的识别算法,该方法对传统的模板匹配算法进行了改进,提高了变形、断裂等字符的识别率。这种方法在试验中得到了验证,取得了令人满意的效果。文结合轮胎编码识别系统的
12、实现对在线图像字符编码识别系统的设计进行了阐述,提出了一种模板匹配与特征匹配相结合的识别算法,该方法对传统的模板匹配算法进行了改进,提高了变形、断裂等字符的识别率。这种方法在试验中得到了验证,取得了令人满意的效果。外文原文(复印件)The Development of A Kind of Online Image Code Recognition SystemAbstract: This paper describes the design and the implement of online image coding char recognition system. It analyses
13、 and researches the important contents about the system. Then it provides the solutions of main problems. In recognition algorithm, combining template matching with feature recognition, it put forword an improved template matching algorithm based on feature weights. The algorithm can obviously impro
14、ve the char recognition ratio.Keyword: image processing; pattern recognition; feature weights; software design0 IntroductionsCharacter recognition of image coding is still the subject of intense study at home and abroad, it has broad applications, such as Automatic number plate recognition, postal c
15、ode of the automatic identification, automatic reading papers, reports, automatic processing, because of this online image coded character recognition has some common, this paper online tire coding character recognition system for the general image coding character recognition system has been elabor
16、ated on the key link of the research and analysis, the method of the other online image coded character system Development of guiding significance.1 An online image coding identification system processesOnline image coding character recognition system includes digital image capture, storage, image p
17、reprocessing, encoding the image extraction, feature extraction coding, coding identification and follow-up treatment of some aspects of its flow chart shown in Figure 1.Image preprocessingFollow-up treatmentFeaExtraction and Identification CodeCoded image capture and storageFigure 1-line character
18、recognition image coding system flowchartOnline tire image coding character recognition system requires the production pipeline through the acquisition of each tire with tire encoded image, and then through image processing, coding to extract features of the tire, using the appropriate recognition a
19、lgorithm to identify each coded character. Tire coding characters as a certain deformation in the tires, and different camera angles, are also great differences in the coding images, regularity is poor, so coded image preprocessing and recognition algorithms of selection is very important.2 Image Ac
20、quisition and StorageLine coding commonly used digital camera images, digital cameras, digital video cameras capture and processed in computer, the system uses QuickCamPro4000 tire coding digital camera image capture, directly from JPG format.Coded images generally must first convert BMP image forma
21、t, because the BMP format has become the de facto standard PC in the field - almost all of the Windows operating system designed for image processing software to support this format of the image. BMP is the original Windows bitmap format, which can be used to save any type of digital map data, can s
22、upport all Windows supported screen resolution and color combination. Under normal circumstances, in order to ensure the display of high efficiency, it does not have any compressed image data, so a small bitmap may occupy considerable space.BMP bitmap file includes the bitmap file header, bitmap inf
23、ormation header, palette, bitmap data area of four parts, bitmap file header from 14 bytes constitute the bitmap header from 40 bytes composition, tone color palette depends on the number of monochrome color images.Board accounted for 8 bytes, 16-color palette images accounted for 64 bytes, 256-colo
24、r palette image 1024 bytes total, 224-color images without color palette, the bitmap data from the region under the order of the data by row and on the arrangement from left to right.3 PreprocessingImage preprocessing includes are: gray image, image noise reduction and enhancement, coding, edge dete
25、ction, image geometry correction, image coding region of extraction, encoding image binarization, character segmentation, character normalization and so on. Here are some key aspects of the process.3.1 gray image processingImages are usually color coded, the actual identification with the image is g
26、rayscale, where the need to convert first color-coded images to grayscale. In the RGB color model, if R = G = B, then color (R, G, B) indicates a Black white color, in which R = G = B is called the value of gray value, gray level processing is to make the color of the R , G, B component value equal
27、to the process. Gray-scale processing methods are commonly used weighted average method, that is,R = G = B = (WRR + WGG + WBB) / 3Which, WR, WG, WB are the R, G, B the weight of experimental and theoretical proof, when WR = 0.3, WG = 0.59, WB = 0.11, that is when R = G = B = 0.30R +0.59 G +0.11 B, c
28、an be the most reasonable grayscale.3.2 image enhancement processing3.2.1 Direct gray-scale transformation linear gray level transformation: if the image gray scale is linear, as in the original image f (x, y) gray-scale range of a, b, asked the transformed image intensity range of up to c, d, Accor
29、ding to the linear law, the transformed image g (x, y) as: (1) nonlinear transformation - log transformation and exponential transformation:When the need to expand low gray zone, gray zone of high compression used on the log transformation, when the need to expand the use of high gray area index tra
30、nsformation.3.2.2 smoothing filter - Noise ReductionAs the noise in the area corresponding to the edge of the image gray value of such rapid change with a larger part is a high frequency, so the use of low-pass filter (ie, smoothing filter) noise. At the same time can make the image fuzzy smoothing
31、is beneficial to the larger goal of the extraction prior to removal of the smaller details or to target the small interruption link.Smoothing noise reduction method is to use the template on the image convolution operation, linear smoothing filter is the most commonly used template is shown in Figur
32、e 2 of the 3 × 3 template, this template and image in pixels by the following method of convolution , get smooth image noise reduction. In the figure, roaming the template and the template center and map location of each pixel overlap; the template on the coefficient multiplied with the templat
33、e under the corresponding pixel; add all the product; It will assign the figure corresponds to the template and the center of the pixel.The most commonly used non-linear smoothing filter is median filter, it will all of the values of the region are sorted according to size, will be sorted in the mid
34、dle of the pixel values given to the center pixel. Median filter can effectively remove the random noise, can get a better visual effect.3.3 Edge detection codingEdge is the result of discrete gray value can be used to request the first and second derivative method to detect. Because the derivative
35、of the edge of a large area, rather than the local derivative of the edge of the small. As the digital image is discrete, not the derivative, convolution method can replace the differential with the differential approximation.Is better Sobel edge detection algorithm is operator. Sobel operator is a
36、gradient amplitude, respectively, using vertical operator Sx, Sy operator to obtain the level of the coding region of the vertical edges and horizontal edges, that is, the horizontal and vertical directions as shown in Figure 3 using two different volumes product template, get the edge as shown in F
37、igure 4 results.-101-202-101121000-1-2-1Figure 2 smoothing filter template Figure 3 Sobel edge detection templateFigure 4Sobeledgedetection operator3.4 Image RectificationHough transform can detect the coding region of the image angle, the angle of rotation according to the coding region of the imag
38、e transformation can be corrected.Hough transform to the image space XY of the line (y = px + q) parameter space detection problem is transformed into the mid-point of detection PQ, PQ in the parameter space, the establishment of a cumulative array Sum (p, q), for each given the edge in image space,
39、 let p taken over all possible values, according to linear equation q =- xp + y to calculate the corresponding q, on the Sum (p, q) to accumulate, by Sum (p, q) the value of the is the (p, q) point total of the number line, (p, q) is the image space in the value of the slope and intercept, obtained
40、by the slope angle of the edge image coding standard.3.5 Character CuttingCoded character area on the level of scanning directly from the character spacing can generally be out of character segmentation. Can also be done by coded character area vertical projection operation, according to the charact
41、er width and character less the total number of characters to be cut. Figure 5 is a coded character areas and the corresponding vertical projection.Figure 5 encoded characters and the corresponding Figure 6 Schematic diagram of vertical projection linear interpolation3.6 Character normalizationThe c
42、haracter of the segmented into four scans to determine the character boundaries, and then use linear interpolation for each character for normalized so that each character is normalized to 32 × 16 lattice. Figure 6 Schematic diagram of linear interpolation, according to linear theory, f (x1) by
43、 the formula (2) Calculation: (2)4 Identification algorithmTo determine the general characteristics of character recognition or template matching method, Feature identification is based on the degree of feature extraction stages, complete with a structural analysis approach to character recognition.
44、 Template matching that is based on knowledge of the characters take shape matching method according to the template matching is generally divided into two categories: direct use of the imported two-dimensional plane images and dictionary matching graphics memory; the other is out of some feature match with the dictionary.Tire coding image only some of the characters and English chara
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 定制化招聘服务合同
- 2024年度市政设施施工终止及后续维护服务合同3篇
- 2024年度人工智能技术顾问服务合同3篇
- 2024年展会中心委派保安展会服务合同3篇
- 2024年度危险品物流合同:运输合同标的的环保安全监管条款3篇
- 职业培训机构课程复课证明制度
- 非营利组织消防安全管理制度
- 2024版物流企业人力资源外包服务合同范本3篇
- 物流公司财务管理制度的效率提升
- 高一班级班主任工作制度
- 美容皮肤科临床诊疗指南诊疗规范2023版
- 高速公路工程建设指挥部计量支付管理办法
- 吉林省吉林市2023-2024学年高三上学期第二次模拟考试 生物 二模
- 线上房博会方案
- 2023年CNC程序工程师年度总结及下一年计划
- 成长的足迹展现独特的魅力小学四年级主题班会
- 隧道工程监控量测
- 第12课 明朝的兴亡
- 国开《Windows网络操作系统管理》形考任务6-配置Web服务实训
- 第六章危险化学品的包装、储存和运输安全
- 落地式钢管脚手架验收记录表
评论
0/150
提交评论