Chess move tracking using overhead RGB webcam
This paper proposes a real-time application for detecting the moves of a chess game given a video stream from a camera positioned over the board. A custom implementation based on square identification of flood filled regions is used to detect colored chessboards in arbitrary backgrounds. The detected board is transformed to a normalized image, and occupancy of the chessboard is determined by classifying the pixels within each square of the 8×8 grid to check for a piece of a given color. A move is recognized when the current occupancy grid matches the chessboard that results from one of the possible moves from the previous occupancy grid. These moves and occupancy grids are supplied by a chess engine. A simple motion detection method is used to avoid processing frames in which a player is obscuring any part of the board. It uses hysteretic n-frame thresholding of difference images.