摘要
针对现存象棋打谱方式繁琐、成本较高的问题,提出了一种基于机器视觉的象棋自动打谱方法。对图像进行预处理后,首先结合二值化与连通区域搜索进行人手遮挡检测,随后采用Hough圆检测、字符矩阵等方法对棋子进行定位,接着将棋子分为红黑两方,并利用局部二进制模式直方图(local binary pattern histogram,LBPH)算法实现棋种识别,最后通过动态识别棋子移动路径,根据行棋规则生成着法。选取50局象棋比赛录像进行测试,结果表明,该方法在识别准确率达到99%的前提下,1 s内可对5帧图像进行处理与识别,且对50个视频识别得到的棋谱正确率均为100%,可以完全满足各类型对局的打谱需求。
Addressing the issue of cumbersome and costly existing notation methods for Chinese chess,an automatic chess notation method based on machine vision is proposed.The method involved a series of steps,beginning with image preprocessing,followed by hand occlusion detection using binarization and connected region search.Subsequently,Hough circle detection,character matrix and so on were combined to locate the chess pieces.The next steps involved classifying the chess pieces into red ones and black ones,distinguishing between them and employing the local binary pattern histogram(LBPH)algorithm for chess species recognition.Finally,the moves were generated by dynamically recognising the movement paths of the chess pieces.To evaluate efficacy of the method,50 chess match videos were selected for testing.The results demonstrate that this method can process and recognise 5 frames per second with 99%accuracy,while achieving a 100%success rate for producing notations across all tested videos,which can fully meet the notation requirements for various types of games.
作者
戴林鑫
彭辉
DAI Linxin;PENG Hui(College of Economics and Management,Huazhong Agricultural University,Wuhan 430070,China;College of Informatics,Huazhong Agricultural University,Wuhan 430070,China)
出处
《应用科技》
CAS
2024年第2期151-160,共10页
Applied Science and Technology
基金
国家重点研发计划项目(2022YFD2002304-05).
关键词
象棋打谱
机器视觉
图像预处理
连通区域
搜索算法
圆检测
字符识别
局部二进制模式直方图
Chinese chess notation
machine vision
image preprocessing
connected region
search algorithm
circle detection
character recognition
local binary pattern histogram