Sudoku Solver

Dependencies:

  1. Numpy
  2. Tesseract-eng
  3. Scikit-image
  4. Imutils

Command to Run:

The command to run the software is: ./sudokuImageSolver.py

Video of the code running is included at the end of the presentation (7:46)

Introduction:

This project takes an image of a sudoku puzzle printed on paper and solves it.

The Challenge:

The algorithm needs to be fed a real-time snapshot via a phone camera or a scanned image of a sudoku puzzle page.

The program uses OpenCV's edge detection feature to find the game board. Once these edges have been detected, the program uses an algorithm t determine the discrete input boxes from the edges as well as the different line thickness for the unique groups. This is doubly important for variants where the 1-N character groups are not always a uniform box (ie. Jigsaw).

The program uses an OCR (Optical Character Recognition) engine called Tesseract to determine which unique character is where on the game grid (for both answers and clues) so that these can then be passed on to the solving algorithm.

Resources: