﻿ 基于机器视觉的轴承压印字符识别
 计算机系统应用  2020, Vol. 29 Issue (3): 278-283 PDF

Bearing Imprint Character Recognition Based on Machine Vision
ZHANG Zhen-Cheng, ZHOU Di-Bin, ZHU Jiang-Ping
Hangzhou Institute of Service Engineering, Hangzhou Normal University, Hangzhou 311121, China
Foundation item: National Natural Science Foundation of China (11772301); Natural Science Foundation of Zhejiang Province (LY17F0220016); Industrial Intelligent Manufacturing Project (Collaborated), Second Round of Teaching Case Database Construction for Degree-Oriented Graduate Courses, Hangzhou Normal University
Abstract: At present, many bearing production lines use manual naked eyes to identify the bearing workpiece number, which not only has poor recognition effect but also has low efficiency. In this study, a bearing embossing character recognition algorithm based on machine vision is designed, which is beneficial to bearing production and subsequent management. Firstly, the noise of the collected image is reduced by Gaussian filtering to reduce the influence of noise on the subsequent operation, and then the least square method is used to extract the ROI ring to determine the image region to be operated. Then the 1/8 circle scanning method is used to expand the ring image to make the character recognition operation more concise; then the character is segmented and normalized; finally, the character is recognized by SVM. The experimental results show that this method can realize bearing imprint character recognition, the recognition accuracy is more than 98%, and has good robustness, the system response speed is fast, and can meet the needs of industry.
Key words: machine vision     image preprocessing     imprinted characters     character recognition

1 字符区域提取

1.1 图像预处理

 图 1 轴承图像

1.2 圆心定位及半径查找

 $a = \dfrac{{BE - CD}}{{AD - {B^2}}},\;\;b = \dfrac{{AE - BC}}{{{B^2} - AD}}$
 $c = - \dfrac{{\displaystyle\sum ({x_i}^2 + {y_i}^2) + a\sum {x_i} + b\sum {{\rm{y}}_i}}}{n}$

 $A = n\sum\limits_{}^{} {{x_i}^2 - \sum\limits_{}^{} {{x_i}} \sum\limits_{}^{} {{y_i}} }$
 $B = n\sum\limits_{}^{} {{x_i}{y_i}} - \sum\limits_{}^{} {{x_i}} \sum\limits_{}^{} {{y_i}}$
 $C = n\sum\limits_{}^{} {{x_i}^3} + n\sum\limits_{}^{} {{x_i}{y_i}^2} - \sum\limits_{}^{} {({x_i}^2 + {y_i}^2)\sum\limits_{}^{} {{x_i}} }$
 $D = n\sum\limits_{}^{} {{y_i}^2 - \sum\limits_{}^{} {{y_i}} \sum\limits_{}^{} {{y_i}} }$
 $E = n\sum\limits_{}^{} {{x_i}^2{y_i} + n\sum\limits_{}^{} {{y_i}^3} - \sum\limits_{}^{} {({x_i}^2 + {y_i}^2)\sum\limits_{}^{} {{y_i}} } }$

1.3 ROI提取

 $h(i,j) = \alpha*f(i,j) + \beta$

 图 2 ROI区域

 图 3 图像处理前

2 字符图像提取 2.1 字符带展开

 图 4 图像处理后

 图 5 圆展开示意图

 图 6 圆的对称图

 图 7 当前像素与下一候选像素示意图

 $F(x,y) = {x^2} + {y^2} - {R^2}$

 $\left\{ \begin{array}{l} {\text{圆上}}, {{F}}({{x}},{{y}})=0, {\text{选择}}p_2{\text{为点}}{{P}}{\text{的下一像素点}}\\ {\text{圆外}}, {{F}}({{x}},{{y}})>0, {\text{选择}}p_1{\text{为点}}{{P}}{\text{的下一像素点}}\\ {\text{圆内}}, {{F}}({{x}},{{y}})<0, {\text{选择}}p_2{\text{为点}}{{P}}{\text{的下一像素点}} \end{array} \right.$

 图 8 字符带展开图

2.2 单个字符切分与归一化处理

 \left\{ \begin{aligned} &{X = \dfrac{{W - 1}}{{w - 1}}x,\;{\text{其中}}0 \le x \le (w - 1),\;0 \le X \le (W - 1)}\\ &{Y = \dfrac{{H - 1}}{{h - 1}}y,\;{\text{其中}}0 \le y \le (h - 1),\;0 \le Y \le (H - 1)} \end{aligned}\right.

 图 9 单个字符切分

3 字符识别

4 实验与结果分析

5 结束语

 [1] 宗洋. 轴承字符缺陷检测系统研究[硕士学位论文]. 洛阳: 河南科技大学, 2012. [2] 高保平, 白瑞林. 轴承压印字符自动识别算法的研究. 电视技术, 2012, 36(9): 142-145. DOI:10.3969/j.issn.1002-8692.2012.09.039 [3] 王鹏, 朱小燕. 基于RBF核的SVM的模型选择及其应用. 计算机工程与应用, 2003, 39(24): 72-73. DOI:10.3321/j.issn:1002-8331.2003.24.022 [4] 吴颖慧. 基于机器视觉的轴承工件号识别系统设计与实现[硕士学位论文]. 大连: 大连海事大学, 2013. [5] 项超军. 基于支持向量机及神经网络的车牌识别技术研究[硕士学位论文]. 武汉: 华中师范大学, 2016. [6] 叶晨洲, 杨杰, 宣国荣. 车辆牌照字符识别. 上海交通大学学报, 2000, 34(5): 672-675. DOI:10.3321/j.issn:1006-2467.2000.05.023 [7] 朱小燕, 史一凡, 马少平. 手写体字符识别研究. 模式识别与人工智能, 2000, 13(2): 174-180. DOI:10.3969/j.issn.1003-6059.2000.02.011 [8] 张引, 潘云鹤. 面向车辆牌照字符识别的预处理算法. 计算机应用研究, 1999(7): 85-87. [9] 张云刚, 张长水. 利用Hough变换和先验知识的车牌字符分割算法. 计算机学报, 2004, 27(1): 130-135. DOI:10.3321/j.issn:0254-4164.2004.01.017 [10] 潘翔, 叶修梓, 张三元. 基于小波的车牌汉字特征提取. 中国图像图形学报, 2003, 8(10): 1218-1222. [11] 陈寅鹏, 丁晓青. 复杂车辆图像中的车牌定位与字符分割方法. 红外与激光工程, 2004, 33(1): 29-33. DOI:10.3969/j.issn.1007-2276.2004.01.008 [12] 赵雪春, 戚飞虎. 基于彩色分割的车牌自动识别技术. 上海交通大学学报, 1998, 32(10): 4-9. DOI:10.3321/j.issn:1006-2467.1998.10.002 [13] 高聪, 王福龙. 基于模板匹配和局部HOG特征的车牌识别算法. 计算机系统应用, 2017, 26(1): 122-128. DOI:10.15888/j.cnki.csa.005507 [14] 吴颖慧. 基于机器视觉的轴承工件号识别系统设计与实现[硕士学位论文]. 大连: 大连海事大学, 2013. [15] 王敏, 黄心汉, 魏武, 等. 一种模板匹配和神经网络的车牌字符识别方法. 华中科技大学学报, 2001, 29(3): 48-50. [16] 郑宇晨. 基于支持向量机的英文字符识别研究. 计算机技术与发展, 2019, 29(1): 106-109. DOI:10.3969/j.issn.1673-629X.2019.01.022 [17] 李阳. 基于机器视觉的压印字符识别系统研究[硕士学位论文]. 广州: 广东工业大学, 2017.