Back to top

Better Browsers:


OpenCV - Face Detection

November 23, 2011

I've been dealing with OpenCV (Open Computer Vision library) for an interesting marketing project.
I've came to test it using Java as well as C++. I believe it can also be linked to a C# application as well.

Here is a basic output:

Java version is actually just a wrapper library of original OpenCV which has much greater functionality.
C++ OpenCV libraries come with pre-populated XML files which are basically generated using OpenCV by feeding
the application thousands of images to detect faces. These include, profile faces, eyes, mouth, nose, front-face face detection.

Now lets get to code:

Now here is a C++ implementation that triggers Gusher (candy) videos once a person does a bite action with his/her mouth.
OpenCV C++
The idea of detecting a bite is simple. Take the average mouth height and width and if there is a particular increase in size, a bite is detected and play the video.

Here is the bite detection code:

Here is other parts of the code:

There you have it. Basic tutorial on using OpenCV and C++ as well as Java. If you have any questions feel free to CONTACT me.


Add Comment: