Take a look at this links. Carnegie Mellon University made a camera specially to use with mcu. https://www-2.cs.cmu.edu/~cmucam/
**broken link removed**
I talked to the guys at CMU and they sent me the firmware of the cam. It contains some interesting routines for tracking and stuff like this. I'll post the code here.