A week or so ago, this picture was making the rounds. A couple different people had smaller copies of it, but I was unable to find out who actually made it. Because the instances of the picture I saw were quite small, I assumed it was assembled by some crazy algorithm with a huge corpus of art to compare.

So, of course, I spent the next day or two thinking about what that algorithm would look like. My friend, John, lent me a number of really interesting Computer Vision books when he moved over the summer. I remembered reading a chapter on template matching. Turns out that won't really do the trick, but it's close.

Long story short: The original picture that was floating around was actually just planned out and painted, so I tried to implement my algorithm.

The test picture was taken by Steh. It's pretty high up on the list when you look for "interesting" photos tagged "face" on Flickr.

Anyway, the corpus of search images was entirely too small for this undertaking. However, after browsing through the output, I believe it's probably close to correct. If not, it's on the right path. If you click on the image above, you can see some neat things going on. For example, on both sides of her neck, the algorithm found hair in a similar alignment. Man. That sounded a bit creepier than I wanted.

But! The fun part! I've been looking for a good excuse to start playing with Hadoop for a while. I've gone through their grep example and all that, but that just doesn't give the kind of joy I was expecting. Hadoop, by the way, is more-or-less a Java implementation of Google's Map Reduce algorithm. And, it's sweet.

There is a level of nirvana you never know until you get 12 CPUs absolutely pegged. I can only imagine the euphoria of having access to a proper cluster.

So, I'm going to keep working on this. Right now, I'm trying to have transforms not love contrast so damn much. I think a once-over with the ol' profiler could also do some good.