Face Detection Using PHP

Face detection is a computer technology that determines the locations and sizes of human faces in arbitrary (digital) images. It detects facial features and ignores anything else, such as buildings, trees and bodies. Maurice, in his blog svay.com, explains he was looking for a face detection script for PHP, but wasn’t able to find one working without OpenCV (Open Source Computer Vision), an opensource lib that was originally developed by Intel.

face detection1 Face Detection Using PHP

OpenCV seems to perform well but you need to be able to install it on your server. So he coded his own pure PHP face detection class, that does not require any library to be installed on the server. His class itself has been translated from a javascript code that actually is no longer available online.

Using it is very easy, just write:

$detector = new Face_Detector('detection.dat');
$detector->face_detect('your_file.jpg');
$detector->toJpeg();

once you unpacked and included detection.dat and the image in the same path as your class.

Source: http://www.emanueleferonato.com/2010/07/06/php-face-detection-class/

Incoming search terms for the article:

Related Posts

eBag Toolkit

Twitter Cards PHP 1.1

Selfoss 2.4 – A Nice and Simple Alternative To Google Reader

Watermark Your Images With Watimage 0.7

No comments