Getting Started with Opencv + Python + Face Detection

Posted on July 14th, 2012 · Posted in Labs

Here is a short guide on how you can start off with some facial detection thanks to some awesome opensource software.

Setting up your Mac

I already have the amazing Brew package manager installed for OSX. If you don’t have it installed yet, you can follow the setup guide here.

Python Interface to OpenCV

Now that was easy.. To get the basic code running I had to make some minor edits to the code posted by Jozilla to make it work on the latest version of OpenCV. The demo code, along with the Haar Cascade file mentioned in the article are posted on github.

Final Result

I have posted a video of the final result.

Example Code

Happy hacking!

More about the OpenCV project