Make sure you are using the Official RaspbianOS
(the hard-float version) and that it is up to date.
You may want to overclock your raspberry pi
. I did to 800mhz. The higher you go the faster the facial recognition will be, but the less stable your pi may be.
Install OpenCV for python: sudo apt-get install python-opencv
Get the wonderful servoblaster servo driver for the raspberry pi by Richard Hirst: here
You can download all the files as a zip archive and extract them to a folder somewhere on the pi.
To install the servo blaster driver open a terminal and CD into the directory where you extracted the servoblaster files
run the command: make install_autostart
You may want to make servoblaster time-out and stop sending signals to the servo after a second if it's not being moved.
to do this add the following line to /etc/modules: servoblaster idle_timeout=1000
start servoblaster with the following command: sudo modprobe servoblaster
The next task is to get the camera functioning as expected:
First of all, thanks a lot to Gmoto
for finding this and pointing it out, it was the last piece of the "pi" to get everything running smoothly; you have to adjust some parameters in the uvcvideo module to get everything running well.
Namely, run these commands:
modprobe uvcvideo nodrop=1 timeout=5000 quirks=0x80
You will need to run that every time you reboot if you plan to run the face tracking program, or alternatively add the parameters to /etc/modules like you did with the servoblaster time-out tweak.