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

Part_1/p1_search.png

Handle

Source

OpenCV

p1_search.png

Handle

Source

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.

p2_search.png

search_placeholder.jpg

search_placeholder.jpg

Source

Part 3

Find and mark all small squares in the empty grid. Color each square using a random color.

p3_search.png

search_placeholder.jpg

Source

Part 4

Find all 'X' symbols within the grid and color them red.

p4_search.png

placeholder.jpg

Source

Part 5

Find and color all instances of the symbols 'X', 'O', and solid dot. Color each symbol in a different color.

p5_search.png

placeholder.jpg

Source

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.

p6_search.png

placeholder.jpg

Source

Part 7

Replace all symbols 'X' with 'Y' and also change the font type.

p7_search.png

placeholder.jpg

Source

Part 8

This is similar to part 7 but for all symbols. Replace all identical symbols with a different symbol or letter.

p8_search.png

placeholder.jpg

Source

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.

p9_search.png

placeholder.jpg

Source

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.

p10_search.png

placeholder.jpg

Source

Extra Credit 1

Repeat the task from part 10 above using this new image below.

ec1_search.png

placeholder.jpg

Source

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.

ec2_NoisyPattern1.png

search_placeholder.jpg

ec2_NoisyPattern2.png

search_placeholder.jpg

Source