Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Maurice Svay's Blog:
Face detection in pure PHP (without OpenCV)
Jun 22, 2009 @ 17:53:22

Maurice Svay has a new blog post that includes a script he's developed to perform facial recognition (detect faces in images) with PHP without the need of the Open-CV library.

OpenCV seems to perform well but you need to be able to install it on your server. In my case, I wanted to have a pure PHP solution, so it can work with most hosts. So I started to think about implementing it myself. [...] I kept searching and finally found a canvas+javascript implementation of face detection at http://blog.kpicturebooth.com/?p=8. The code looked fairly compact and simple. Shouldn't be hard to port to PHP.

The class takes in the filename of an image (just JPG, but could easily be adapted) and a data file to use to run the image through the GD image library and output a JPG similar to this with the face highlighted by a red square.

tagged: gd opencv detection face

Link:

Robert Eisele's Blog:
Face detection with PHP
Jul 24, 2008 @ 17:55:41

Robert Eisele has posted on an interesting topic recently - using a PHP interface to the OpenCV library (from Intel) to detect faces in images.

The headline does say facedetection - but what does this mean? Easy said, this article focus on how to find faces on images with PHP. Faces have a certain form and so it is possible to search for it. At the end of the search you will say how many human faces are on the image or better: Where are human faces on my image. This article is not intended to be mathematically.

The OpenCV library is a pattern-detection tool that can, based on the "experience" it has trained on with sample files, do its best to find similar structures in any given image. He's come up with a wrapper that handles most of the details for you. You can define the xml file type (frontalface, lowerbody, upperbody, etc) that you want it to try to match to.

He gives some examples of the output from each on one of the sample images included in the training group as well as a random photo grab from flickr that dynamically tries to apply one of the face filters.

tagged: face detect opencv intel wrapper tutorial

Link:


Trending Topics: