Supplementary images files for this homework are also posted on the class website.

Part 1

Write a program that uses basic morphological operations to identify each black and white square in the chess grid. Fill in the black and white squares with two different, distinct colors. You must solve this in both board using Matlab and OpenCV.

Matlab

input/Part_1/p1_board.jpg

Handle

Source
% Insert your code here
											

OpenCV

input/Part_1/p1_board.jpg

Handle

Source
// Insert your code here
											

Part 2

Write a program that prints the location of each chess square (e.g., E5) as an overlay over the orignal image. Solve this and all subsequent problems using either MATLAB or OpenCV.

input/Part_2/p2_board_1.jpg

input/Part_2/p2_board_2.jpg

input/Part_2/p2_board_3.jpg

output/Part_2/placeholder.jpg

output/Part_2/placeholder.jpg

output/Part_2/placeholder.jpg

Source
// Insert your code here
										

Part 3a

Write a program to find all knights.

input/Part_3a/p3a_board_1.jpg

input/Part_3a/p3a_board_2.jpg

input/Part_3a/p3a_board_3.jpg

output/Part_3a/placeholder.jpg

output/Part_3a/placeholder.jpg

output/Part_3a/placeholder.jpg

Source
// Insert your code here
										

Part 3b

Modify your program to find all bishops, knights, rooks, queens, and kings.

input/Part_3b/p3b_board_1.jpg

input/Part_3b/p3b_board_2.jpg

input/Part_3b/p3b_board_3.jpg

output/Part_3b/placeholder.jpg

output/Part_3b/placeholder.jpg

output/Part_3b/placeholder.jpg

Source
// Insert your code here

Part 3c

Repeat Part 3b on noisy chess boards.

input/Part_3c/p3c_board_1.jpg

input/Part_3c/p3c_board_2.jpg

input/Part_3c/p3c_board_3.jpg

output/Part_3c/placeholder.jpg

output/Part_3c/placeholder.jpg

output/Part_3c/placeholder.jpg

Source
// Insert your code here
										

Part 4 Extra Credit

Write a program to draw each valid move for each knight and bishop.

input/Part_4/p4_board_1.jpg

input/Part_4/p4_board_2.jpg

input/Part_4/p4_board_3.jpg

output/Part_4/placeholder.jpg

output/Part_4/placeholder.jpg

output/Part_4/placeholder.jpg

input/Part_4/p4_board_4.jpg

input/Part_4/p4_board_5.jpg

input/Part_4/p4_board_6.jpg

output/Part_4/placeholder.jpg

output/Part_4/placeholder.jpg

output/Part_4/placeholder.jpg

Source
// Insert your code here