[Revision 2: 12 February. Changed due date because of blizzard.] [Revision 1: 31 January 2013] CS 4500 Assignment #4. Assigned: Tuesday, 29 January 2013 Due: Monday, 18 February 2013 Working in an instructor-approved team of four students (except for a few smaller teams approved by the instructor), develop a rapid prototype of a preliminary version of the semester project that matches pattern images to subimages of source images. Your prototype's source code must be written entirely by your team. Your team may not use source code written by other students, source code obtained from the World-Wide Web or other sources, and it may not use software packages that are not already installed on the CCIS Linux machines. Your prototype must include a README file (which *must* be in UTF-8 plain text, and must be named README) that 1. lists all members of your team, 2. gives the preferred email address(es) for contacting your team, 3. tells the grader(s) how your team's rapid prototype can be compiled and run on any CCIS Linux machine in the main lab, 4. acknowledges any third party software used (by permission!) in your submitted software. All of the files necessary to construct and to run your prototype must be combined into a gzip'ed tar file whose name ends in tar.gz. Submit that gzip'ed tar file before noon on the date it is due using the submit script that's described at the course assignments page: http://www.ccs.neu.edu/course/cs4500wc/assignments.html Your prototype will be graded on these criteria: 1. the quality of the instructions and documentation in your README file, 2. the ease of constructing and running your prototype on CCIS Linux machines, 3. your prototype's correctness with respect to parsing correct command lines producing correct output not producing extraneous output not attempting to create files outside of /tmp 4. your prototype's accuracy with respect to matching pattern images with their original source images the location of that match within the source image 5. your prototype's robustness with respect to recognizing matches despite lossy transformations error conditions 6. your prototype's efficiency with respect to run time 7. and the readability of your source code. Your prototype's build process must result in software that can be invoked by cd'ing to the directory containing your software's executable and executing the following command: ./spims -p -s where is the name of an existing file in JPEG, PNG, or GIF format without animation (the "pattern image") is the name of an existing file in JPEG, PNG, or GIF format without animation (the "source image") If your software discovers that or does not exist, is not readable, or is not in one of the allowed image formats, then your software should write a comprehensible error message to standard error and terminate with an exit code other than 0. If your software concludes that the pattern image was probably obtained from the source image by some composition of cropping and change of image format, then your software should write one line to standard output, in the following format: matches at x++ where is the short name (without the name of its enclosing directory, et cetera) of the pattern image (which should be the same as the short name of the file given as on the command line) is the short name (without the name of its enclosing directory, et cetera) of the matching source image (which should be the same as the name of the file given as on the command line) is the width of the subimage that matches (which should be the same as the width of the pattern image) is the height of the subimage that matches (which should be the same as the height of the pattern image) is the horizontal offset of the top left corner of that subimage from the top left corner of the source image is the vertical offset of the top left corner of that subimage from the top left corner of the source image If your software finds a match and produces the correct line of output, then it should be possible to recreate a close approximation to the image in by executing this command on one of our CCIS Linux machines: convert -crop x++ where is the name of the new file that will be created (and should resemble ). If your software does not find a match, then it should terminate without producing any output whatsoever. If the inputs were acceptable, then your software should terminate with an exit code of zero regardless of whether it finds a match. ---------------------------------------------------------------- Examples. /course/cs4500wc/Assignments/A4 contains two subdirectories, Patterns and Sources. The Patterns subdirectory contains the pattern images mentioned in the following examples. The Sources subdirectory contains the source images mentioned in these examples. ---------------- ./spims -p /course/cs4500wc/Assignments/A4/Patterns/black.jpg \ -s /course/cs4500wc/Assignments/A4/Sources/bb0001.jpg should produce the following output: black.jpg matches bb0001.jpg at 35x44+797+609 ---------------- ./spims -p /course/cs4500wc/Assignments/A4/Patterns/black.jpg \ -s /course/cs4500wc/Assignments/A4/Sources/hh0021.jpg should produce no output. ---------------- ./spims -p /course/cs4500wc/Assignments/A4/Patterns/cliff.png \ -s /course/cs4500wc/Assignments/A4/Sources/an0300.jpg should produce cliff.png matches an0300.jpg at 212x146+1060+247 ---------------- ./spims -p /course/cs4500wc/Assignments/A4/Patterns/flower.gif \ -s /course/cs4500wc/Assignments/A4/Sources/ac1000.jpg should produce flower.gif matches ac1000.jpg at 194x135+101+998 ---------------- ./spims -p /course/cs4500wc/Assignments/A4/Patterns/nature.jpg \ -s /course/cs4500wc/Assignments/A4/Sources/hh0021.jpg should produce nature.jpg matches hh0021.jpg at 160x97+742+181 ---------------- ./spims -p /course/cs4500wc/Assignments/A4/Patterns/rock.jpg \ -s /course/cs4500wc/Assignments/A4/Sources/ar0800.jpg should produce rock.jpg matches ar0800.jpg at 103x99+973+230 ---------------- ./spims -p /course/cs4500wc/Assignments/A4/Patterns/tree.jpg \ -s /course/cs4500wc/Assignments/A4/Sources/aa0010.jpg should produce tree.jpg matches aa0010.jpg at 405x296+604+708 ---------------- ./spims -p /course/cs4500wc/Assignments/A4/Patterns/ranch.jpg \ -s /course/cs4500wc/Assignments/A4/Sources/ai0059.gif should produce ranch.jpg matches ai0059.gif at 1600x1200+0+0 ---------------- ./spims -p /course/cs4500wc/Assignments/A4/Patterns/morning.png \ -s /course/cs4500wc/Assignments/A4/Sources/ak432.png should produce morning.png matches ak432.png at 640x480+0+0 ---------------- All other combinations of pattern images in the Patterns directory with source images in the Sources directory should produce no output. ----------------------------------------------------------------