CS 332

Assignment 2

Extra Credit Problem

Due: Thursday, September 22

Whodunit???

This problem is worth 5 extra points for Assignment 2.

A heinous crime was committed in the Computer Science department this past weekend — someone stole Captain Abstraction's suit while he assumed his alter-ego as a mild-mannered computer science professor! Even more shocking — it appears to have been an inside job! The circumstances of the crime point in the direction of a faculty member in the CS department — Takis, Sohie, Orit or Brian! One piece of evidence was left at the scene — a lone partial fingerprint. The CS332 class has been recruited by the Wellesley campus police to help nail the culprit. Fortunately we have a fingerprint on file for each of our four suspects. Your mission, should you choose to accept it, is to complete a MATLAB program to identify the mysterious fingerprint.

The fingerprint images and some initial code for this problem can be found in the /home/cs332/download/fingerprints subdirectory on the CS file server. Download this folder to your MAC or PC and set your Current Directory in MATLAB to this folder. The script file fingerprintScript.m reads in five images that include fingerprints for the four suspects (240x256 pixel images) and the mystery partial fingerprint (a 51x51 pixel image named finger.jpg). This script also displays each of the five images in separate figure windows. There are some additional commands at the end of the script that are initially commented out, which can be executed after you complete the definition of the getMatch function described below.

The goal of the program is to determine which of the four suspect fingerprint images best matches the mystery partial fingerprint image. Of course, the partial fingerprint will only match a small portion of one of the full fingerprint images. To assist in this process, define a function getMatch that has two inputs, a partial fingerprint image and full fingerprint image. This function should return a number that somehow quantifies the best match between the partial fingerprint and a patch of the input full fingerprint. Depending on how you measure this quantity, the best match could be captured by a higher or lower value of this measure. Be sure to add comments to your getMatch function describing your approach. After completing the definition of getMatch, uncomment the statements in the fingerprintScript.m script to obtain values for how well the partial fingerprint matches the fingerprints of Takis, Sohie, Orit and Brian. Add code to the script to use these match values to determine the culprit of this horrific crime, and print out a message with the name of the culprit. A simple string can be printed with the disp function, e.g. disp('What a blow to the CS department!').

Submission details: Hand in a hardcopy and electronic copy of your getMatch.m and modified fingerprintScript.m code files with the rest of your Assignment 2 work.