Journal of Computer Applications ›› 2020, Vol. 40 ›› Issue (12): 3490-3498.DOI: 10.11772/j.issn.1001-9081.2020060892

• 2020 Asian Conference on Artificial Intelligence Technology (ACAIT 2020) • Previous Articles     Next Articles

General chess piece positioning method under uneven illumination

WANG Yajie1, ZHANG Yunbo2, WU Yanyan1, DING Aodong2, QI Bingzhi2   

  1. 1. Engineering Training Center, Shenyang Aerospace University, Shenyang Liaoning 110136, China;
    2. School of Computer Science, Shenyang Aerospace University, Shenyang Liaoning 110136, China
  • Received:2020-06-19 Revised:2020-08-27 Online:2020-12-10 Published:2020-10-20
  • Supported by:
    This work is partially supported by the Aeronautical Science Foundation of China (2015ZC54008), the “Xing Liao Talent Program” of Liaoning Province (XLYC1906003).

不均匀光照下的通用棋子定位方法

王亚杰1, 张云博2, 吴燕燕1, 丁傲冬2, 祁冰枝2   

  1. 1. 沈阳航空航天大学 工程训练中心, 沈阳 110136;
    2. 沈阳航空航天大学 计算机学院, 沈阳 110136
  • 通讯作者: 张云博(1996-),女,辽宁锦州人,硕士研究生,主要研究方向:模式识别、计算机视觉、机器人。1013103525@qq.com
  • 作者简介:王亚杰(1968-),女,辽宁铁岭人,教授,博士,CCF会员,主要研究方向:模式识别、图像融合、机器博弈;吴燕燕(1989-),女,河南开封人,实验师,硕士,主要研究方向:图像融合、图像处理、计算机视觉;丁傲冬(1995-),男,江苏徐州人,硕士研究生,主要研究方向:机器博弈、计算机视觉;祁冰枝(1995-),女,四川巴中人,硕士研究生,主要研究方向:机器博弈、机器人
  • 基金资助:
    航空科学基金资助项目(2015ZC54008);辽宁省兴辽英才计划项目(XLYC1906003)。

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.

Key words: chess piece positioning, uneven illumination, corner detection, image mask, convex hull, chessboard recognition, chess robot

摘要: 针对下棋机器人系统中光照分布不均匀造成的棋子定位误差问题,提出了基于分块凸包检测和图像掩膜的通用棋子定位方法。首先,提取出棋盘轮廓上的点集,利用分块凸包法检测棋盘四个顶点的坐标;然后,定义标准棋盘图像中四个棋盘顶点的坐标,根据透视变换原理计算转换矩阵;其次,根据不同类型棋盘的小方格面积差异来识别棋盘类型;最后,将捕获到的棋盘图像陆续矫正为标准棋盘图像,获得相邻两个标准棋盘图像的差分图,并对差分图进行膨胀、图像掩膜相乘和腐蚀的操作,从而得到棋子有效区域并计算其中心坐标。实验结果表明:所提方法在四种光照不均匀情况下对围棋和象棋棋子的平均定位准确率可达到95.5%和99.06%,相较于其他棋子定位算法有明显的提升,并且解决了棋子粘连、棋子投影和镜头畸变导致的局部棋子定位不精准的问题。

关键词: 棋子定位, 光照不均匀, 角点检测, 图像掩膜, 凸包, 棋盘识别, 下棋机器人

CLC Number: