Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 2 KB

README.md

File metadata and controls

39 lines (27 loc) · 2 KB

Sudoku_solver

Solving Sudoku with OpenCV_Python_CNN

Sudoku_raw_image:

Converting image to gray scale to reduce information:

Blur the image to remove noise:

(Smoothing the image with Gaussian filter, a low-pass filter that reduces the high-frequency components)

Thresholding the image to seperate foreground pixels from background pixels (minimizing the background noise):

Adaptive thresholding - the threshold value is calculated for smaller regions and therefore, there will be different threshold values for different regions.

Inverting colors so as to find the contours properly:

Finding the largest contour in the image i.e., sudoku:

Finding the corners and extracting the ROI:

Extracting all the cells of the grid:

Extracted cell:

Extracting and recognizing the digits in the cell:

Solving the sudoku using python-constraints

Solved Sudoku: