Taking a video input via a webcam and then extracting the Sudoku from it. Digits are extracted from this Sudoku which is then recognised using a model I trained on a very small Char74k Dataset(only digits).
python solveSudoku.py
Using a LeNet design for training my model. I tried using the MNIST dataset as well but the dissimilarity in '1' on printed characters doesn't allow it to work well.
To solve the sudoku. I am using Peter Norvig's backtracking algorithm. And after finding the solution I am overlaying the solution(Basically the digits) on the video feed itself. You can also save the output both as image and video.
The whole code is in Python. I followed various blogs for this. I will add the references in the comments section.
Note: It might ask your webcam id. The code will print itself all available webcam IDs
- Python3
- open-cv
- Webcam
-
Sudoku Extraction:
-
Dataset: Chark74k