Skip to content

imsahil007/SudokuSolver

Repository files navigation

Sudoku Solver on real-time webcam feed!

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).


Image Gif

Run:

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

Requirements:

  • Python3
  • open-cv
  • Webcam

References:

About

A python opencv based program to solve sudoku

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages