News for hackers. Stuff that matters.
Re:Face detection with OS X and python by dekomote on Tuesday December 14, 2010 @12:03PM (#2004791)
For those developing on Debian based Linux, these are the steps:

1. Install python-opencv package with apt-get/aptitude

2. You can get the Haar cascades here - http://alereimondo.no-ip.org/OpenCV/34

3. Run the same code, just make sure to use one of the cascades downloaded from step 2

Line 60: parser.add_option("-c", "--cascade", action="store", dest="cascade", type="str", help="Haar cascade file, default %default", default = "/usr/local/Cellar/opencv/2.2/share/opencv/haarcascades/haarcascade_frontalface_default.xml") Change default to the haar cascade file path, or use --cascade option to specify it.

4. Execute

Edit: For non-Deb based distros, use your package manager to download/install opencv for python (or compile it) and continue from step 2.

Re:Face detection with OS X and python by beambot on Tuesday December 14, 2010 @02:13AM (#2003425)
FYI, there are OpenCV-based face detection nodes in ROS (Robot Operating System by Willow Garage) that publish the detected face positions using a stereo pair (which prunes false positives based on face depth/size estimates). Slightly modified to use one camera or a Kinect, and you would have a python consumer node that requires a mere 5 lines of Python code. ;-)

http://www.ros.org/wiki/face_detector

Re:Face detection with OS X and python by recurser on Tuesday December 14, 2010 @02:49AM (#2003465)
thanks for the link, very interesting - stereo cameras would never have occurred to me, but obvious in hindsight. If i can get my hands on another camera I'll give it a shot.
Re:Face detection with OS X and python by andre on Tuesday December 14, 2010 @03:34AM (#2003542)
does it call any other services? or is it all in the JS?
Re:Face detection with OS X and python by recurser on Tuesday December 14, 2010 @03:42AM (#2003560)
It's a demo of python/opencv via the command line - it doesn't use JS or the web.