Supplementary files for this homework are posted on the class web page.
Part 1
Write a program that uses basic morphological operations to identify and crop the grid in the image shown below. The result image should contain only the pixels inside the grid, including the outer border. Edit the web template to display your result image and the computer code that was used to generate it for this and all subsequent parts. You must solve part1 using Matlab and OpenCV.
Matlab
|
|
OpenCV
|
|
Note: change the file name if necessary to link your code
Part 2
Write a program that starts by cropping the grid (as was done in part1) and then separates the grid from the symbols. Output two images: one that contains only the grid without any symbols and another that contains only the symbols without the grid. Solve this and all subsequent problems using either MATLAB or OpenCV.
|
|
|
|
Part 3
Find and mark all small squares in the empty grid. Color each square using a random color.
|
|
Part 4
Find all 'X' symbols within the grid and color them red.
|
|
Part 5
Find and color all instances of the symbols 'X', 'O', and solid dot. Color each symbol in a different color.
|
|
Part 6
Find all symbols within the grid. Color each symbol in a different color. Identical symbols must have the same color.
Cutouts of all symbols used in this problem can be found in the Symbol_Cutouts folder.
|
|
Part 7
Replace all symbols 'X' with 'Y' and also change the font type.
|
|
Part 8
This is similar to part 7 but for all symbols. Replace all identical symbols with a different symbol or letter.
|
|
Part 9
The symbols in each row form a sequence that begins to repeat after 2, 3, or 4 symbols. Find the first instance of a repeated subsequence and color those symbols in blue. Find the second instance and color those symbols in red. Repeat this for all rows.
|
|
Part 10
This is similar to part 9 but now you have to continue the sequence en each to fill all empty squares with the same pattern.
|
|
Extra Credit 1
Repeat the task from part 10 above using this new image below.
|
|
Extra Credit 2
Extend your code and approach to work with these noisy and rotated images that also have a different font. Note that in some rows the pattern repeats only once.
|
|
|
|