Skip to content

AliShazly/sudoku-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoku-py

An augmented reality sudoku solver using OpenCV.

Usage

Installation

pip install -r requirements.txt

main.py

usage: main.py [-h] [-f FILE] [-s] [-w] [-d]

arguments:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  File path to an image of a sudoku puzzle
  -s, --save            Save image to specified file's current directory
  -w, --webcam          Use webcam to solve sudoku puzzle in real time
                        (EXPERIMENTAL)
  -d, --debug           Enables debug information output

Examples

python main.py --file assets/c6.jpg

Output_Image

python main.py --webcam

Output_Gif

Breakdown

Image Processing

Breakdoown_img

Algorithm Visualization

Breakdoown_alg

Limitations

  • Webcam solver cannot detect when a new puzzle has entered the frame, will try to warp the solution of the first puzzle it sees onto any subsequent puzzles
  • OCR predictions are very spotty for hand written digits and stylized fonts
  • Cannot solve puzzles that don't have a distinguishable four-point outer border

About

An augmented reality sudoku solver using OpenCV

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages