Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Face Detection in images using OpenCV and Python (spottedsun.com)
91 points by pippy on Oct 11, 2011 | hide | past | favorite | 15 comments


Sometime back I had to get passport photos and was very pissed that Walgreens and CVS charge about $10 for 2 photos. This seemed inexplicable as the cost of a typical 4x6 print is about 10c at Snapfish (or 19c at Walgreens). Realizing that they were exploiting the fact that most people didn't know how to format passport photos themselves, I decided to create a webapp that does the required formatting automatically. OpenCV's fast face detector (it uses the current best Viola-Jones algorithm http://research.microsoft.com/en-us/um/people/viola/) proved invaluable for this. You can check out the results at: http://freepassportphoto.dyndns.org/

Any suggestions for improvement from you guys would be greatly appreciated.


I implemented this in Picasa too! Tools->Experimental->Passport Photo.


As an experiment, several years ago I released a few "fun" iPhone apps that leveraged OpenCV to do face detection and image replacement using the iPhone camera. I did dozens of successful tests before launch, and the apps have collectively been downloaded hundreds of thousands of times. I'd say overall effectiveness in the wild is pretty high, but it depends on the filter used. If anyone is interested I can send a link, but don't want to spam this audience with it.


I remember your app! The one that would automatically hit the shutter when a face was detected? That was an awesome use of OpenCV.


What was you overall success of the apps? I've been trying to create some for the Droid market, then branching into iOS. Is it the kind of thing that can take over a full time job, or just extra pocket cash?


It'd be brilliant if you could post some resources for leveraging OpenCV for iOS apps.


I'm very interested


I've put together some basic computer vision tutorials over here - http://www.aishack.in/ Most of them use OpenCV.


This is a great tutorial. I have been working on an open source python library called SimpleCV that makes this trivially easy. Grabbing an image from a camera is one line of code. Applying the face detector in also a single line of code. Check it out here: http://simplecv.org/


This thread just gave me a great idea. I am going to add inline image download and upload to SimpleCV. E.g. img = Image("http://foo.com/stuff.jpg) img = img.dosomething() img.upload(src="imgur" apikey="ASDFASDFASDF") This will be fun. I just ticketed it up. Hopefully I will have it pushed to the repo this week.


Wow, this is very possibly the coolest computer vision related link I've ever seen on HN. Thank you so much for making this!


That's really cool, I'm going to check that out and see what fun stuff I can do in it... /author


Nice. The same can be done wit hthis jQuery plugin: http://facedetection.jaysalvat.com/

It is based on this computer vision library: https://github.com/liuliu/ccv


I wrote a smaller version a few months ago with the same modules at gaweda.tumblr.com. I sent the writer some questions about his purpose as well.

I'm attempting to re-implement Viola Jones without OpenCV as a way to really understand what is going on in the algorithm (a little more difficult than I imagined). Eventually developing a feature extractor.

One of the bigger issues I find myself asking is how can I turn face detection into a business model? Everything I imagine only seems to point to mobile apps, but I can't imagine that can replace a full-time job.

I could branch into recognition, but there a plenty of companies that already have that developed.


I've had this demo up for a while: http://www.wefoundland.com/face_detection

Test OpenCV's face detection algorithm.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: