A Python-based machine vision application that detects a physical chessboard in real-time using OpenCV and processes moves from a live camera feed with the python-chess library.
This system is designed to automate board recognition and move tracking for casual games, tournaments, or chess analysis — eliminating the need for manual input and time management software.
![]() Original Board View |
![]() Warped & Aligned View |
- Real-time board detection from webcam
- Perspective correction and grid extraction
- Tracks piece positions and move changes
- Integrates with
python-chessfor legal move validation - Easy to extend for PGN/FEN export, clock management, or online play
- Python 3.x
- OpenCV
- numpy
- python-chess
- matplotlib (optional, for visualization)
pip install opencv-python numpy matplotlib python-chess
