南京大学学报(自然科学版) ›› 2019, Vol. 55 ›› Issue (1): 117–124.doi: 10.13232/j.cnki.jnju.2019.01.012

• • 上一篇    下一篇

一种自动读取指针式仪表读数的方法

李 巍1,王 鸥1,刚毅凝1,周杨浩2*,郝跃冬3   

  1. 1. 国家电网辽宁省电力有限公司信息通信分公司,沈阳,110006; 2. 南京大学软件新技术国家重点实验室,南京,210023; 3. 南瑞集团有限公司(国家电网电力科学研究院有限公司),南京,211000
  • 接受日期:2018-11-20 出版日期:2019-02-01 发布日期:2019-01-26
  • 通讯作者: 周杨浩, E-mail:574468762@qq.com E-mail:574468762@qq.com
  • 基金资助:
    国家电网公司科技项目(SGLNXT00DKJS1700166)

An automatic reading method for pointer meter

Li Wei1,Wang Ou1,Gang Yining1,Zhou Yanghao2*,Hao Yuedong3   

  1. 1. State Grid Liaoning Information and Communication Company,Shenyang,110006,China; 2. State Key Laboratory for Novel Software Technology,Nanjing University,Nanjing,210023,China; 3. Nari Group Corporation(State Grid Electric Power Research Institute),Nanjing,211000,China
  • Accepted:2018-11-20 Online:2019-02-01 Published:2019-01-26
  • Contact: Zhou Yanghao, E-mail:574468762@qq.com E-mail:574468762@qq.com

摘要: 介绍一种基于机器学习和图像处理算法,针对自然场景中的指针仪表图片进行仪表检测和读数识别. 首先,检测并提取出图像中恰好包含仪表的部分,再针对不同的图像中仪表存在大小的多尺度特点,使用图像金字塔方法对原图进行多次的缩小和放大操作. 再使用固定大小的滑动窗口对缩放后的图像进行遍历,提取每个窗口图像HOG(Histogram of Oriented Gradient)特征,使用线性SVM(Support Vector Machine)分类器对窗口是否含有仪表进行判断. 然后对检测得到的仪表图像,通过图像处理的方法进行图像预处理,减少阴影的干扰,获取梯度、边缘等信息,再结合改进的霍夫变换,结合仪表图像的灰度信息检测指针的位置,以计算指针的角度. 最后,根据指针的角度以及量程信息,计算当前指针的读数. 实验证明,该方法具有较好的稳定性与准确性.

关键词: 指针仪表, HOG特征, 支持向量机, 霍夫变换

Abstract: The purpose of this paper is to introduce a method based on machine learning and image processing technology for instrument detection and reading recognition of pointer meter images taken in natural scenes. Firstly,in order to recognize the reading,the patch of the image which exactly contains the meter is detected and extracted from the original input image. By the image pyramid method,the original image is scaled to different sizes via multiple reduction and enlargement operations to deal with the different sizes of the instruments in different images. Then,the scaled images are traversed by a fixed-size sliding window,and the Histogram of Oriented Gradient(HOG)description of each window is extracted. The confidence whether the window contains a meter is computed by inputing the description of this window to the trained linear SVM(Support Vector Machine)classifier. And the window with the highest confidence is extracted as the output patch. After obtaining the patch,in order to reduce the interference of shadow and obtain information such as gradients and edges,the extracted patch of the detected instrument is preprocessed by image-processing methods such as histogram equalization and bilateral filter. Inspired by the Hough transform,the improved Hough transform is proposed to combine the gray scale information of the processed image and center position of the dial plate to detect the pointer and calculate the angle of the pointer. The direction with the smallest grayscale value is choosen as the direction of pointer. Finally,the current reading of the meter is calculated based on the angle of the pointer and the range information. The results of experiments show that the method can achieve good stability and accurate reading.

Key words: pointer meter, HOG, SVM, Hough transform

中图分类号: 

  • TP319.4
[1] 陶冰洁,韩佳乐,李 恩. 一种实用的指针式仪表读数识别方法. 光电工程,2011,38(4):145-150.(Tao B J,Han J L,Li E. An applied method for reading recognition of index-instrument. Opto-Electronic Engineering,2011,38(4):145-150.)
[2] 蒋 薇. 基于图像识别的指针式仪表数据处理终端研究. 硕士学位论文. 青岛:青岛大学,2014.(Jiang W. Research on pointer instrument data processing terminal based on image recognition. Master Dissertation. Qingdao:Qingdao Univer-sity,2014.)
  [3] 赵 菁. 基于图像处理的指针式仪表识别设计. 硕士学位论文. 西安:西安电子科技大学,2011.(Zhao J. Pointer instrument recognition design based on image processing. Master Dissertation. Xi’an:Xidian University,2011.)
[4] 孙 琳,王永东. 指针式仪表自动检定系统图像识别技术. 现代电子技术,2011,34(8):101-104.(Sun L,Wang Y D. Image recognition technology of index meter automatic verification system. Modern Electronics Technique,2011,34(8):101-104.)
[5] 徐 洋,张清蓉. 基于图像处理的汽车指针仪表检测研究. 计算机应用与软件,2014,31(8):219-221,252.(Xu Y,Zhang Q R. Research on image processing-based automotive pointer instruments detection. Computer Applications and Software,2014,31(8):219-221,252.)
[6] 何智杰,张 彬,金连文. 高精度指针仪表自动读数识别方法. 计算机辅助工程,2006,15(3):9-12,18.(He Z J,Zhang B,Jin L W. Highly accurate automatic dial recognition. Computer Aided Engineering,2006,15(3):9-12,18.)
[7] 王 瑞,李 琦,方彦军. 一种基于改进角度法的指针式仪表图像自动读数方法. 电测与仪表,2013,50(11):115-118.(Wang R,Li Q,Fang Y J. An automatic reading method of pointer instrumen’s image based on improved angle method. Electrical Measurement & Instrument,2013,50(11):115-118.)
[8] 王 欣,孙 鹏. 智能变电站中指针式仪表图像自动识别方法. 电气技术,2016,17(5):7-10.(Wang X,Sun P. Automatic identification method of the pointer instrument in intelligent substation. Electrical Engineering,2016,17(5):7-10.)
[9] 朱海霞. 基于改进Hough变换和BP网络的指针仪表识别. 电测与仪表,2015,52(5):11-14.(Zhu H X. Pointer instrument recognition based on BP network and improved Hough transform. Electrical Measurement & Instrument,2015,52(5):11-14.)
[10] 石 伟,王朝立,陈建帅等. 基于图像处理的变电站指针式仪表读数研究. 电子科技,2016,29(1):118-120,127.(Shi W,Wang C L,Chen J S,et al. Substation pointer instrument reading based on image processing. Electronic Science and Technology,2016,29(1):118-120,127.)
[11] 王东灿. 一种智能变电站指针式仪表读数识别方法. 电脑知识与技术,2018(14):191-192.(Wang D C. Intelligent substation pointer type meter reading recognition method. Computer Knowledge and Technology,2018(14):191-192.)
  [12] 张文杰,熊庆宇,张家齐等. 基于视觉显著性的指针式仪表读数识别算法. 计算机辅助设计与图形学学报,2015,27(12):2282-2295.(Zhang W J,Xiong Q Y,Zhang J Q,et al. Pointer type meter reading recognition based on visual saliency. Journal of Computer-Aided Design & Computer Graphics,2015,27(12):2282-2295.)
[13] Liu W,Anguelov D,Erhan D,et al. SSD:Single shot MultiBox detector ∥ European Conference on Computer Vision(ECCV 2016). Amsterdam,the Nertherlands:Springer Cham,2016:21-37.
[14] Ren S Q,He K M,Girshick R,et al. Faster R-CNN:Towards real-time object detection with region proposal networks. IEEE Transactions on Pattern Analysis and Machine Intelligence,2017,39(6):1137-1149.
[15] Dalal N,Triggs B. Histograms of oriented gradients for human detection ∥ 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition. San Diego,CA,USA:IEEE,2005:886-893.
[16] Cortes C,Vapnik V. Support-vector networks. Machine Learning,1995,20(3):273-297.
[17] 邓乃扬,田英杰. 支持向量机——理论、算法与拓展. 北京:科学出版社,2009,167-180.
[1] 朱荀,刘国强,丁华平,沈庆宏. 一种通过支持向量机对交通拥堵情况进行分类的方法[J]. 南京大学学报(自然科学版), 2020, 56(2): 278-283.
[2]  赵小强1,2,3*,张 露1.  基于SVM的高维不平衡数据集分类算法[J]. 南京大学学报(自然科学版), 2018, 54(2): 452-.
[3]  张栋冰.  基于视觉注意机制与支持向量机结合的车标定位方法[J]. 南京大学学报(自然科学版), 2018, 54(2): 481-.
[4]  付康安1,郭虎升1,王文剑1,2*.  基于关联关系分析的符号数据分类方法[J]. 南京大学学报(自然科学版), 2017, 53(4): 815-.
[5]  陈未未,张兴敢*. 基于一维距离像和微动特征的弹道导弹识别方法
[J]. 南京大学学报(自然科学版), 2016, 52(6): 1113-.
[6] 张鹏,黄毅,阮雅端,陈启美*. 基于稀疏特征的交通流视频检测算法[J]. 南京大学学报(自然科学版), 2015, 51(2): 264-270.
[7] 陈鹏1郭剑毅1,2余正涛1,2严馨1,2张志坤1,2高盛祥1,2. 融合领域知识短语树核函数的中文领域实体关系抽取[J]. 南京大学学报(自然科学版), 2015, 51(1): 181-186.
[8]  王兆云,张兴敢**,柏业超.  基于微多普勒的锥体目标进动和结构参数估计[J]. 南京大学学报(自然科学版), 2014, 50(2): 148-.
[9] 翟俊海1,2王婷婷1王熙照1,2. 一种改进的样例约简支持向量机[J]. 南京大学学报(自然科学版), 2013, 49(5): 596-602.
[10] 潘世超1,王文剑1,2**,郭虎升1. 基于概率密度估计的增量支持向量机算法[J]. 南京大学学报(自然科学版), 2013, 49(5): 603-610.
[11] 包文颖1,胡清华2,王长忠1**. 基于多粒度数据压缩的支持向量机[J]. 南京大学学报(自然科学版), 2013, 49(5): 637-643.
[12] 张宇1,王文剑1,2,郭虎升1. 基于粒分布的加速训练方法[J]. 南京大学学报(自然科学版), 2013, 49(5): 644-649.
[13]  郭剑毅1.2**,李真1·2,余正涛1·2,张志坤1.2
.  领域本体概念实例、属性和属性值的抽取及关系预测*[J]. 南京大学学报(自然科学版), 2012, 48(4): 383-389.
[14]  郭丽娜1**,杨杨2.  一种基于模糊支持向量机软件模块缺陷检测算法*
[J]. 南京大学学报(自然科学版), 2012, 48(2): 221-227.
[15]  白龙飞1,王文剑2**,郭虎升1.  一种新的支持向量机主动学习策略*
[J]. 南京大学学报(自然科学版), 2012, 48(2): 182-189.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
[1] 徐扬,周文瑄,阮慧彬,孙雨,洪宇. 基于层次化表示的隐式篇章关系识别[J]. 南京大学学报(自然科学版), 2019, 55(6): 1000 -1009 .
[2] 郭小松,赵红丽,贾俊芳,杨静,孟祥军. 密度泛函理论方法研究第一系列过渡金属对甘氨酸的配位能力[J]. 南京大学学报(自然科学版), 2019, 55(6): 1040 -1046 .
[3] 陈睿, 伏云发. 基于EEG握力变化及想象单次识别研究[J]. 南京大学学报(自然科学版), 2020, 56(2): 159 -166 .