Font Size: a A A

Research On Chess Game System Based On Machine Vision

Posted on:2024-08-09Degree:MasterType:Thesis
Country:ChinaCandidate:Y F YangFull Text:PDF
GTID:2557306932460494Subject:Electronic information
Abstract/Summary:PDF Full Text Request
The role of machine vision systems is to analyze images,process information such as color and pixel distribution to extract target features,and then control the corresponding device actions based on the processing results.As one of the machine vision systems,a chess gaming system can understand the game,think about the strategy and make moves to play against the user.Current chess robots use special chess boards and pieces,which makes the recognition of chess board positions not universal,or the chess board position recognition algorithms are difficult to extend because of the high requirements for light and other environments.The thesis introduces the general framework of chess gaming system,vision module and system workflow,image acquisition mode and manual motion detection,composition of decision module,detection and correction of chess board,detection of chess corner points under chess board and calibration of vision system,and focuses on chess position recognition algorithm,the proposed chess position recognition algorithm can correctly locate and recognize chess pieces on the chess board,and at the same time the proposed game recognition algorithm can correctly locate and recognize the chess pieces on the chessboard while maintaining good detection results under different environments.Finally,experiments are conducted on the whole system.The main research contents of the thesis are as follows:(1)The workflow of the vision module is designed.The first step is to detect and calibrate the chess board,then detect the straight lines on the board and calculate the corner coordinates of the board,then use the corner coordinates of the board to calibrate the camera,then determine whether the user is making a move,and after the user finishes making a move,the game recognition is performed,i.e.,the positioning and recognition of the chess pieces is completed.(2)The thesis proposes an improved SSD(Single Shot Multi Box Detector,SSD)algorithm for the problems of high environmental requirements,inaccurate piece localization and low correct recognition rate of previous game recognition algorithms.The improved SSD algorithm modifies the backbone feature extraction network of the SSD network by introducing depth-separable convolution and residual structure;the number of layers of feature extraction and the aspect ratio of the prior frame of the SSD are changed to better suit the chess board piece detection task.(3)The thesis proposes a two-stage detection algorithm,i.e.,the piece concatenation domain shape center localization method and the convolutional neural network recognition method,to address the problems of high environmental requirements,inaccurate piece localization and low recognition accuracy of previous chess game recognition algorithms.The two-stage detection algorithm divides the localization and recognition of chess pieces into two steps: firstly,the red and black pieces on the chessboard are segmented by using the threshold of HSV color model,then the image is grayed out,binarized,and morphological open operations are performed to connect the heads on the Chinese characters of the chess pieces into a connected domain,and finally,the center coordinates of the chess pieces are obtained by using the shape center formula of the connected domain.The center coordinates are used to intercept the chess piece image and fed into the trained convolutional neural network for chess piece recognition.The convolutional neural network can reduce the number of convolutional layers and pooling layers to make the number of network parameters smaller while ensuring high recognition rate.(4)The proposed method is used to implement the chess gaming system in software and hardware.A laptop computer is used as the host computer to run the vision module and the decision module,and the software interface of the host computer is used to display the chess board information in a simple and intuitive way.The STM32 controller is used as the lower computer to control the robot arm to play chess.The experimental results show that the chess game system can accurately identify the chessboard position and output the system moves to control the robot arm to play the game in real time with the user.The thesis firstly designs the general framework of the chess gaming system and introduces the functions of each module,then designs the workflow of the vision module,including chess board calibration,vision system calibration,manual move detection,and chess piece positioning recognition.The thesis proposes an improved SSD algorithm and a two-stage algorithm for the problems of high environmental requirements,inaccurate piece localization and low recognition accuracy of previous chess game recognition algorithms.The proposed two methods locate the pieces accurately in different environments and recognize the pieces correctly,thus ensuring that the chess gaming system can recognize the games correctly in different environments.Finally,the software and hardware implementations of the chess gaming system are carried out using the proposed methods.The vision module first acquires the chessboard image and corrects it,and determines whether the user is making a move or not,locates and identifies the pieces on the chessboard and generates a chess game status string to transmit to the decision module.The robot arm moves according to the output of the decision module to play against the human.
Keywords/Search Tags:Machine Vision System, Location of Chess Pieces, Chess Pieces Recognition, Chinese Chess Robot, Convolutional Neural Network
PDF Full Text Request
Related items