General chess piece positioning method under uneven illumination
WANG Yajie1, ZHANG Yunbo2, WU Yanyan1, DING Aodong2, QI Bingzhi2
1. Engineering Training Center, Shenyang Aerospace University, Shenyang Liaoning 110136, China; 2. School of Computer Science, Shenyang Aerospace University, Shenyang Liaoning 110136, China
Abstract:Focusing on the problem of chess piece positioning error in the chess robot system under uneven illumination distribution, a general chess piece positioning method based on block convex hull detection and image mask was proposed. Firstly, the set of points on the outline of the chessboard were extracted, the coordinates of the four vertices of the chessboard were detected using the block convex hull method. Secondly, the coordinates of the four vertices of the chessboard in the standard chessboard image were defined, and the transformation matrix was calculated by the perspective transformation principle. Thirdly, the type of the chessboard was recognized based on the difference between the small square areas of different chessboards. Finally, the captured chessboard images were successively corrected to the standard chessboard images, and the difference images of two adjacent standard chessboard images were obtained, then the dilation, image mask multiplication and erosion operations were performed on the difference images in order to obtain the effective areas of chess pieces and calculate their center coordinates. Experimental results demonstrate that, the proposed method has the average positioning accuracy of Go and Chinese chess pieces arrived by 95.5% and 99.06% respectively under four kinds of uneven illumination conditions, which are significantly improved in comparison with other chess piece positioning algorithms. At the same time, the proposed method can solve the inaccurate local positioning problem of chess pieces caused by adhesion of chess pieces, chess piece projection and lens distortion.
[1] DAY C P. Robotics in industry-their role in intelligent manufacturing[J]. Engineering,2018,4(4):440-445. [2] 沈阳航空航天大学. 一种基于全局视觉的下棋机器人及其控制方法:中国,202010052771.0[P]. 2020-05-12. (Shenyang Aerospace University. Chess playing robot based on global vision and control method:China,202010052771.0[P]. 2020-05-12.) [3] DANNER C, KAFAFY M. Visual chess recognition[R]. Stanford:Stanford University,2015. [4] GUI W,JUN T. Chinese chess recognition algorithm based oncomputer vision[C]//Proceedings of the 201426th Chinese Control and Decision Conference. Piscataway:IEEE,2014:3375-3379. [5] 杜俊俐, 张景飞, 黄心汉. 基于视觉的象棋棋盘识别[J]. 计算机工程与应用, 2007, 43(34):220-222, 232.(DU J L,ZHANG J F, HUANG X H. Chess-board recognition based on vision[J]. Computer Engineering and Applications,2007,43(34):220-222,232.) [6] 翟乃强. 改进的中国象棋棋盘识别方法[J]. 计算机应用, 2010, 30(4):980-981. (ZHAI N Q. Improved Chinese chessboard recognition method[J]. Journal of Computer Applications,2010, 30(4):980-981.) [7] 郭晓峰, 王耀南, 周显恩, 等. 中国象棋机器人棋子定位与识别方法[J]. 智能系统学报, 2018, 13(4):517-523.(GUO X F,WANG Y N,ZHOU X E,et al. Chess-piece localization and recognition method for Chinese chess robot[J]. CAAI Transactions on Intelligent Systems,2018,13(4):517-523.) [8] YU Y. Chinese chess state recognition[R]. Stanford:Stanford University,2015. [9] 党宏社, 张超, 庞毅, 等. 基于ORB算法的象棋快速识别和定位系统研究[J]. 科学技术与工程, 2017, 17(7):52-57.(DANG H S,ZHANG C,PANG Y,et al. Research of fast recognition and positioning system of chess based on ORB algorithm[J]. Science Technology and Engineering,2017,17(7):52-57.) [10] 张志伟, 孔凡让, 赵吉文, 等. 对弈机器人的视觉图像处理和识别[J]. 计算机应用与软件, 2008, 25(2):215-217.(ZHANG Z W, KONG F R, ZHAO J W, et al. Image processing and recognition in the vision of Chinese chess playing robot[J]. Computer Applications and Software,2008,25(2):215-217.) [11] 韩燮, 赵融, 孙福盛. 基于卷积神经网络的棋子定位和识别方法[J]. 激光与光电子学进展, 2019, 56(8):081007-1-081007-8. (HAN X, ZHAO R, SUN F S. Methods for location and recognition of chess pieces based on convolutional neuralnetwork[J]. Laser and Optoelectronics Progress,2019,56(8):081007-1-081007-8.) [12] YOSHIDA K. Challenge:concept of system life and its application to robotics[J]. Robotics and Autonomous Systems,2010,58(7):833-839. [13] DEY N. Uneven illumination correction of digital images:a survey of the state-of-the-art[J]. Optik,2019,183:483-495. [14] LEE S, LEE C. Multiscale morphology based illumination normalization with enhanced local textures for face recognition[J]. Expert Systems with Applications,2016,62:347-357. [15] ZHU J,ZHENG W,LU F,et al. Illumination invariant single face image recognition under heterogeneous lighting condition[J]. Pattern Recognition,2017,66:313-327. [16] CHEN M,TANG C,XU M,et al. Binarization of optical fringe patterns with intensity inhomogeneities based on modified FCM algorithm[J]. Optics and Lasers in Engineering,2019,123:14-19. [17] DE LA ESCALERA A,ARMINGOL J M. Automatic chessboard detection for intrinsic and extrinsic camera parameter calibration[J]. Sensors,2010,10(3):2027-2044. [18] BENNETT S,LASENBY J. ChESS-quick and robust detection of chess-board features[J]. Computer Vision and Image Understanding,2014,118:197-210. [19] BENNETT S,LASENBY J. Robust recognition of chess-boards under deformation[C]//Proceedings of the 2013 IEEE International Conference on Image Processing. Piscataway:IEEE, 2013:2650-2654. [20] LIU Y,LIU S,CAO Y,et al. A practical algorithm for automatic chessboard corner detection[C]//Proceedings of the 2014 IEEE International Conference on Image Processing. Piscataway:IEEE, 2014:3449-3453. [21] DAO V N,SUGIMOTO M. A robust recognition technique for dense checkerboard patterns[C]//Proceedings of the 201020th International Conference on Pattern Recognition. Piscataway:IEEE,2010:3081-3084.