OpenCv python: solve sudoku from image

Nhan Cao
2 min readJul 15, 2018
Overview

Original input image

image from google

First: process input image

Next step, image cell board

This step will split each cell of sudoku (9x9 = 81 cell), after that find contours of number, resize it and push to board.

Next step, recognize number convert to digit array 9x9 using opencv machine learning SVM. https://docs.opencv.org/3.4/d1/d73/tutorial_introduction_to_svm.html

I have to make training data for myself. So that it’s just enough in some case.

Find sudoku solution

Final step: draw to image

DONE!

--

--