Coder Social home page Coder Social logo

sudokusolvercpp's Introduction

Sudoku Solver in C++

How it works

The project uses:

Requirements

  • Windows with c++ runtime

How to use

Execute the following command in the commandline to startup the project.

.\SudokuSolver.exe .\_imgExamples\sudoku1.jpg

The first parameter is the path to the image or the text file.

The software can be run in two different modes:

  • Image mode (.jpg)
  • Text mode (.txt)

Image mode

.\SudokuSolver.exe .\_imgExamples\sudoku1.jpg

Use the mouse to select the ROI (region of interest) / Sudoku on the image:

Hit the right mouse button to clear the current selection. Hit Enter to confirm and to start the analysis.

The solution is drawn on the original picture.

Text mode

The text file must have the following structure:

. for an empty square. (space) every 3 squares.

... ... 8.1
53. ..7 4..
26. ..8 3..
... 82. .3.
..7 .6. .5.
..4 .9. ...
95. 2.. ...
.4. 3.. ...
... ... 1.6

.\SudokuSolver.exe _txtExamples\sudokuFile07-medium.txt

The upper sudoku is the input.

The lower sudoku is the output.

Examples

Input file:

Debug windows:

ROI on image:

Console output:

Operations window:

Final output:

Solution example

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.