3/2: A new set of images of available at images2.tgz
You are welcome to implement your solution however you see fit. However, to ease this process, the relevant files have been extracted and modified slightly to create a working initial solution. An archive, code.tgz contains all the necessary files, along with a few simple tools. A number of sample images, along with their expected outputs, can be downloaded at images.tgz (21MB) and output.tgz (77MB).

Sample Solution

Because you can only submit one file through the TopCoder interface, you will need to merge the source and header files before you can submit. A simple script using standard linux (or cygwin for windows users) commands is available to do this. By running merge.sh, a number of .C and .H files will be merged, include statements will be stripped and a file all.c will be created. You should be able to submit this file to TopCoder.

Output Generator

To create reference files for the images, you just first make reference. You may then run ./reference <file> to create <file>.op.

Solution Comparison

To compare your code to a previously generated reference, you may make compare and then run ./compare <file>. There must already be a file <file>.op, along with <file>. This program will output the MSE between the two images. Note that difference between hardware and compilers (including optimization levels) may lead to minor output difference. In general, the effect of these differences on your score will be negligible.