I'm working on a program that will allow you to compare two images to determine how different or similar they are. It does so by averaging large areas of the image and maintaining a high-accuracy for the averaged pixels' colors. (I scale R, G, B, and A to UInteger before averaging them and keep them there when comparing.)
It seems to work well, but its got a few hacks that I'm not really proud of, but can't think of any way to remove. It also seems horribly inefficient.
The only thing I'm any sort of proud of in it, really, is the PixelArray class that pins a byte array to the same location as a Bitmap class. (Editing the array affect the bitmap and vice versa.)
What I'm looking for is someone to evaluate my code and tell me that I'm not crazy and that things can actually be improved without a complete re-write from scratch. Any suggestions for additional features would be helpful.
Design goals include the ability to serialize the generated signature (the ColorIArray class, already possible) and add some form of multi-threading and a progress callback mechanism so I can add a progress bar when generating signatures for huge images or with huge numbers of datapoints.
The code is throughly commented. You'll need a few images, preferably larger than 20,20 to test this with.