Face Detection with Emgu CV in C# and WPF
- Posted: Sep 26, 2012 at 6:00 AM
- 12,266 Views
- 4 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Today's project by Junian Triajianto is simple on the outside but shows off something that's can be very complex, face detection look easy...
Hi there, this is a new tutorial category in my blog. It's Computer Vision. In this blog, I'd like to show you something cool. It's how to perform Face Detection using your camera / Webcam. You'll see how your application can detect faces from a captured image. Curious about it? Let's take a look how to do that.
This what you need to follow this tutorial:
- Microsoft Visual Studio 2010. Or if you don't have one, you can use 2008 version
- Emgu CV (OpenCV in .NET). You can download the latest version in this link: http://www.emgu.com/wiki/index.php/Main_Page and follow the installation instruction
- Basic Knowledge of C# Programming
- Familiar in WPF Development
After you've got what you need, it's time to rock!
- First thing you should do is installing Emgu CV. Your installation path should be like C:\Emgu\emgucv-windows-x86 2.2.1.1150. And you can see inside C:\Emgu\emgucv-windows-x86 2.2.1.1150\bin some DLLs and sample programs. You can see a simple face detection app Example.FaceDetection.exe and you'll see something like the first picture in this post.
...
...
8. Here is the result of our work:
...
Note : If you can't run your project, just build it and make sure all opencv_xxxx.dll files and haarcascade_frontalface_alt_tree.xml in the same directory with your executable file. You can find those files inside C:\Emgu\emgucv-windows-x86 2.2.1.1150\bin .
Take note of his note... Getting the OpenCV and EmguCV dependices were the hardest part of this project.
Also there there's been a file name change to the noted XML file, haarcascade_frontalface_alt_tree.xml. If you get the latest drop of emgucv-windows-x86 the file name's been changed to "haarcascade_frontalface_default.xml". So you'll need to tweak the code to take that into account.
Here's the before;
And the after;
Once the dependences are in place and the file name fixed, this ran like a charm and really did make facial detection look easy...
If you've been wondering how to do face detection, this project is one you'll want to check out...
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
nice tute........thanks
Really enjoyed this blog post, is there any way I can receive an update sent in an email when you write a new post?
@Augmented Reality Mobility Solution: Not at this point. But you can subscribe to the blog's RSS feed, http://channel9.msdn.com/coding4fun/blog/RSS or follow Channel9 on Twitter, https://twitter.com/@ch9
what about face recognition?
Remove this comment
Remove this thread
close