// you’re reading...

Open Source

I am Mufflerman: Powered by OpenCV and PHP Facedetect

Sometime back I worked on a project which required face detection in the photos uploaded by the user. Yesterday I read about our honorable prime minister Modi ji and BJP are setting selfie booths. This led to the idea of “I am Mufflerman” 😉 Try the demo here.

I am Mufflerman

I am Mufflerman

On the demo page, click on the button on the top and upload a selfie (if on a desktop/laptop) or click a selfie if you are browsing the demo on a phone.

Upload a photo which is a selfie. Do not upload a groupfie (more than one person in the photo). The demo does a frontal face detection so look straight into the camera.If the face cannot be detected the entire uploaded photo shows up on top of the mufflerman image (picked it up from Google Image Search).

The demo is using php-facedetect and OpenCV.

Note: the demo is running on a slow sever with limited bandwidth. It may take upto “49” seconds  for the photo upload and detection 🙂

The code behind can be downloaded from here. The real work is done by the file detect.php in the directory detector. Also the directory haarcascades contains the XML file for OpenCV detection of various facial elements. The XML file used by the demo is haarcascade_frontalface_alt_tree.xml which does a frontal face detection.

For the code to work you will need to install OpenCV and php-facedetect. On Fedora, it is as easy as:

yum install opencv

and

yum install php-facedetect

GD Star Rating
loading...
GD Star Rating
loading...
I am Mufflerman: Powered by OpenCV and PHP Facedetect, 7.6 out of 10 based on 5 ratings
Share

Email This Post Email This Post Print This Post Print This Post Print This Post Post A Comment Tweet your comments/question to me @shekharg

Discussion

2 comments for “I am Mufflerman: Powered by OpenCV and PHP Facedetect”

  1. RT @shekharg: New blog post: I am Mufflerman: Powered by OpenCV and PHP Facedetect http://t.co/1EbMEWFNmm

    Posted by menitin | February 6, 2015, 5:30 pm
  2. RT @shekharg: New blog post: I am Mufflerman: Powered by OpenCV and PHP Facedetect http://t.co/1EbMEWFNmm

    Posted by JuhiHajela | February 6, 2015, 5:46 pm

Post a comment

Recent Tweets

Follow Me on Twitter