Loading...

Real time sudoku solver (Augmented reality)

4,531 views

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Jun 3, 2019

Demonstration of version 0.1 of my Python sudoku solver with sudokus of several difficulties, fonts and font sizes.

How it works:

We get the image and apply gaussian blur and adaptive thresholding to it.
We find the contour of the biggest object in the image with certain characteristics (number of corners, area) and assume it's a sudoku puzzle.
We extract that object, perform a perspective transformation on it and divide it into 9x9 squares.
We again look for contours inside every single square. If we don't find an object of a certain size inside it, we consider there is no number in that square.
We predict what's inside the squares that do have something by using a neural network trained on the EMNIST Digits dataset.
Now that we have turned the sudoku into a simple 2D array, we just apply a sudoku solver algorithm (http://norvig.com/sudoku.html).
We write the new numbers into the squares that are considered empty.
We apply the opposite perspective transformation to the one we did before (getting the inverse of the transformation matrix) and paste our finished sudoku into the original image.

EMNIST Digits dataset: https://www.nist.gov/node/1298471/emn...
Source code: https://github.com/guille0/songoku

Music: Rain Cloud Music by Emily A. Sprague

Loading...

When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...