FaceFlip is a plugin for the Mac webcam effects software CamTwist that detects faces in a video feed and turns them upside down. I've been using it to surprise people on ChatRoulette.
It was created as a project for Golan Levin's "Special Topics in Interactive Art and Computational Design" at Carnegie Mellon University. The source is available on github: github.com/maxhawkins/FaceFlip
Thank you to Steve Green, the creator of CamTwist, for his help with writing this plugin.