Giter VIP home page Giter VIP logo

sudoku-image-solver's Introduction

UNMAINTAINED

This program was written for a school assignment and I have no plans to maintain it going forward.

Sudoku Image Solver

Overview

This is a program that attempts to solve Sudoku puzzles that have been extacted from an image.

How it works

Through various image processing techniques combined with optical character recognition (OCR) this program will try to extract the digits from a Sudoku puzzle. Once the digits are extracted, it will attempt to solve it. The process works as follows:

  1. Find the main grid for the puzzle
  2. Find the four corners associated with this grid
  3. Perform a homology to extract just the puzzle from the image
  4. Perform a form of thresholding if necessary
  5. Extract each cell from the puzzle
  6. Perform OCR to determine the digits
  7. Solve the puzzle

What is included

  1. Test data to train a support vector machine used for optical character recognition
  2. Various test puzzles with the ground truth values used for comparison.

Required libraries

  1. OpenCV
  2. Numpy
  3. PyLab
  4. LibSVM
  5. Python Imaging Library (PIL)
  6. Scipy

Execution

To run the program:

type python imsudoku.py

Results

The average accuracy of extracting the initial digits was 86%.

Sudoku extraction

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.