Sudoku Solver – 2

In the last post we discussed how to extract the sudoku region from the captured frame of a live stream and then we applied perspective transform to the extracted region and then we slide a window through each cell and recognized the digits in the cells. Now in this post we discuss how to solve the sudoku puzzle using Backtracking algorithm. There are several approaches to solve the sudoku puzzle. For example, you can find some of them in this paper.

Though there are several approaches to solve it, let’s stick to the traditional backtracking algorithm to solve the puzzle. For our understanding, just have a look at how the sudoku is presented below.

sudoku-solving

A sample sudoku puzzle

Continue reading

Sudoku Solver – 1

I was very much excited to solve the Sudoku puzzles that appeared in daily newspapers during childhood. In fact it’s a lot of fun solving them and even we (my friends) challenge ourselves to solve them first. By then we don’t know programming and other stuff, so we were not aware of finding the solution with ease. But when I was learning Data Structures and Algorithms long back I got encountered with the famous Backtracking algorithm and yes, solving a sudoku puzzle is one among the challenges that can be solved easily using that algorithm. Continue reading

Recognize Handwritten digits – 1

Recognizing handwritten digits is an easy task and I feel this would be a good one to start with. So coming straight to the point, this post is broken down into 2 parts to make it easy for understanding. The general handwritten digit pipeline can be explained as

  • Preprocessing
  • Segmentation
  • Recognition

In this part we will discuss about the first two, i.e., preprocessing and segmentation. To just give you an idea what is going to be the outcome of this complete post is shown below.

output Continue reading