Supplementary images files for this homework are also posted on the class website.
Part 0
Use basic morphological operations to produce two images: one containing just the grid and one containing just the numbers. Solve this problem using both MATLAB and OpenCV.
Matlab
|
|
|
% Insert your code here
OpenCV
|
|
|
// Insert your code here
Part 1
Write a program that can find the individual cells in an empty Sudoku grid. The program should highlight the cells, e.g., by filling them with different colors. If you can do the last image you’ll get some extra credit. Solve this and all subsequent problems using either MATLAB or OpenCV.
|
|
|
|
|
|
// Insert your code here
Part 2
Extend your program to find the locations of all the numbers in the puzzle. Highlight the numbers in red in the result images. Also print the puzzle on the screen using ASCII characters. There are computer-generated images that don’t have any noise.
|
|
|
|
|
|
// Insert your code here
Part 3
This is similar to part 2 but these are scanned images that contain noise. You can crop small images for each digit and use them to create matching templates that your program can use to find the digits. (You can do this in part 2 as well).
|
|
|
|
|
|
// Insert your code here
Part 4
This is the same as part 3 but the font is different. You may have to generate new matching templates.
|
|
|
|
|
|
// Insert your code here
Extra Credit
Extend your code to solve the puzzle and print its solution.
Special Extra Credit: Write an application that can take in a picture of the daily Sudoku puzzle from your favorite newspaper and print the solution. (iPhone app anyone?)