This is a very old article I wrote on my last blog I hope to write another, more up-to-date one soon.
I hacked together this basic script to detect faces in images using OpenCV, Python, Web.py and ImageMagick. It’s a fun wee learning experience.
At the moment it tries to replace a face with an image. Some more tweaking, and it should be good to go.
I also suppose it’s not much of a tutorial, but if you understand Python, and you have managed to get OpenCV installed, you should be fine.
To run it:
There are quite a few things you’ll need to change to get it working as well, such as the paths etc.
There are some problems – it doesn’t like bitmap (*.BMP) nor cartoon type images. Here are some examples of images that worked: