This program detects faces in an input image, based on the example of the OpenCV wiki.
Compile it with (needs libcv-dev, libcvaux-dev and libhighgui-dev):
$ g++ -O2 -Wall `pkg-config --cflags opencv` -o opencv-facedetect opencv-facedetect.cpp `pkg-config --libs opencv`
Run it with:
$ ./opencv-facedetect image.jpg
To find faces you need a classifier cascade, per default it's the file haarcascade_frontalface_alt.xml in the same directory.
This program is also availabe as a GIMP Plugin:
The algorithm of the OpenCV library is simple, but it even detects Waldo:
cc) by NeitoShaw