Christian did something about face recognition...
For general shape detection this might be interesting for you:
http://en.wikipedia.org/wiki/Viola-Jones_object_detection_framework and maybe also check out this:
http://info.ee.surrey.ac.uk/Personal/Z.Kalal/tld.htmlOther than that, you may want to consider shaders or OpenCL for preprocessing and other parallelizable stuff, for much better performance. For getting a video stream, there is of course OpenCV (which also implements LOTS of algorithsms for working with the data), but I actually really like videoinput, which is just extremely easy to use.