摘要
针对中国象棋机器人系统中棋子识别问题,提出了一种基于目标轮廓与骨架特征的棋子识别算法。首先,采用Hough圆检测进行棋子粗定位及预处理。随后,对单幅棋子图像进行形态学处理,提取最大面积轮廓,并利用其最小外接圆进行定位修正。最后,对定位修正后的棋子图像提取其外轮廓与内骨架,计算其Hu矩作为特征向量,并利用支持向量机(SVM)进行识别。以直径为25 mm的棋子为测试对象,利用象棋机器人采集图像进行测试,结果表明,棋子平均识别率在99%以上,平均识别时间为20 ms,完全满足现有象棋机器人需求。
In view of the problem of chess pieces recognition in Chinese chess robot system,a chess pieces recognition algorithm based on the feature of the target contour and the skeleton is proposed. Firstly,the Hough circle detection is used for the rough location and preprocessing of the chessmen. Then,the single piece image morphological processing,extract the maximum area contour,and position correction using the minimum circumscribed circle. Finally,we extract the contour and skeleton of the corrected chessman image,calculate its Hu moments as the eigenvectors,and send them into the trained support vector machine( SVM) multiple classifiers. Using the chess robot developed by us,taking the diameter of 25 mm pieces as the test object,the images were collected and tested. The result shows that the average recognition rate of the chess pieces is above 99%,and the average recognition time is 20 ms,which fully satisfies the needs of the existing chess robots.
引文
[1]LEE D S,WANG S J,PANG H Y.Computer-controlled Chinese chess[C].International Symposium on Computer Communication Control&Automation,2010:389-392.
[2]庄剑毅.基于ARM嵌入式Linux的象棋机器人控制系统研究[D].广州:华南理工大学,2012.ZHUANG J Y.Research on the control system of Chinese chess robot based on ARM and embedded linux[D].Guangzhou:South China University of Technology,2012.
[3]许丰磊.象棋机器人视觉算法与智能控制软件的研究[D].哈尔滨:哈尔滨工业大学,2006.XU F L.The research of the vision algorithm and intelligent control software for chess robot[D].Harbin:Harbin Institute of Technology,2006.
[4]FANG J,XIAO K,WANG C.Binarized gabor filters based illumination invariant Chinese character recognition[C].IEEE International Conference on Mechatronics and Automation,2009:4976-4980.
[5]司朋举,胡伟.一种改进的神经网络车牌识别算法研究[J].电子测量技术,2016,39(10):100-103.SI P J,HU W.Research on an improved neural network license plate recognition algorithm[J].Electronic Measurement Technology,2016,39(10):100-103.
[6]冯元华,王思华,柳宁,等.机器视觉技术在博弈智能机器人设计中的应用[J].计算机工程与设计,2009,30(14):3371-3379.FENG Y H,WANG S H,LIU N,et al.Application of machine vision technology in design of chess playing intelligent robot[J].Computer Engineering and Design,2009,30(14):3371-3379.
[7]伍锡如,黄国明,孙立宁.基于深度学习的工业分拣机器人快速视觉识别与定位算法[J].机器人,2016,38(6):711-719.WU X R,HUANG G M,SUN L N.Fast visual identification and location algorithm for industrial sorting robots based on deep learning[J].Robot,2016,38(6):711-719.
[8]郭晓峰,王耀南,周显恩,等.中国象棋机器人棋子定位与识别方法[J].智能系统学报,2017,DOI:10.11992/tis.20179020.GUO X F,WANG Y N,ZHOU X EN,et al.Chess piece localization and recognition method for Chinese chess robot[J].CAAI Transactions on Intelligent Systems,2017,DOI:10.11992/tis.20179020.
[9]周显恩,王耀南,李康军,等.一种多次随机圆检测及拟合度评估的瓶口定位法[J].仪器仪表学报,2015,36(9):2021-2029.ZHOU X EN,WANG Y N,LI K J.New bottle mouth positioning method based on multiple randomized circle detection and fitting degree evaluation[J].Chinese Journal of Scientific Instrument,2015,36(9):2021-2029.
[10]JIANG L Y.Fast detection of multi-circle with randomized Hough transform[J].Optoelectronics Letters,2009,5(5):397-400.
[11]白宇.基于轮廓特征的图像配准方法研究[D].武汉:华中科技大学,2016.BAI Y.Research on contour feature based image registration method[D].Wuhan:Huazhong University of Science&Technology,2016.
[12]许新征,丁世飞,史忠植,等.图像分割的新理论和新方法[J].电子学报,2010,38(2A):76-82.XU X ZH,DING SH F,SHI ZH ZH,et al.New theories and methods of image segmentation[J].Acta Electronica Sinica,2010,38(2A):76-82.
[13]黄伟国,顾超,尚丽,等.基于轮廓分层描述的目标识别算法研究[J].电子学报,2015,43(5):854-861.HUANG W G,GU CH,SHANG L,et al.Hierarchical representation method for object recognition[J].Acta Electronica Sinica,2015,43(5):854-861.
[14]周正扬,詹恩奇,郑建斌,等.局部关联度最优的手写汉字骨架提取[J].中国图象图形学报,2017,22(6):833-841.ZHOU ZH Y,ZHAN EN Q,ZHENG J B,et al.Skeleton extraction algorithm based on optimum local correlation degree for handwritten Chinese characters[J].Journal of Image and Graphics,2017,22(6):833-841.
[15]杨唐文,高立宁,阮秋琦,等.移动双臂机械手系统协调操作的视觉伺服技术[J].控制理论与应用,2015,32(1):69-74.YANG T W,GAO L N,RUAN Q Q,et al.Visual servo technology for coordinated manipulation of a mobile dualarm manipulator system[J].Control Theory&Applications,2015,32(1):69-74.
[16]李响,谭南林,李国正,等.基于Zernike矩的人眼定位与状态识别[J].电子测量与仪器,2015,29(3):390-398.LI X,TAN N L,LI G ZH,et al.Eye location and status recognition based on Zernike moments[J].Journal of Electronic and Instrumentation,2015,29(3):390-398.
[17]殷贤华,王宁,陈晶溪.基于太赫兹时域光谱系统的橡胶分类识别[J].国外电子测量技术,2016,35(6):19-23.YIN X H,WANG N,CHEN J X.Rubber classification and recognition based on THz time-domain spectroscopy system[J].Foreign Electronic Measurement Technology,2016,35(6):19-23.
[18]WANG F Q,ZUO W M,ZHANG L,et al.A kernel classification framework for metric learning[J].IEEETransactions on Neural Network and Learning Systems,2013,26(9):1950-1962.
[19]WU J X.Efficient HIK SVM learning for image classifycation[J].IEEE Transactions on Image Processing,2012,21(10):42-53.