Here's another application that uses opencv libraries in the Debian disto. It performs face detection using Haar cascade.
The code below continuously captures frames with a USB web-camera. (In this demo, I displayed a sample picture on a separate laptop but this will also work for actual faces). Using the input frames and a loaded Haar classifier cascade, vector of rectangles containing the detected faces is returned to the user. A bounding box is drawn to each face to show successful detection.
Below is the C/C++ equivalent of the above python script. (The code appears lengthy due to the comments and cleanup routines.)