Silahkan Melihat Tutorial di website kami dengan nyaman ENJOY YOUR LIFE ☕

C# :: Face Detection with Emgu CV in C# and WPF

Camera Face Detection in C# Using Emgu CV (OpenCV in .NET) and WPF

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:
  1. Microsoft Visual Studio 2010. Or if you don't have one, you can use 2008 version
  2. 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
  3. Basic Knowledge of C# Programming
  4. Familiar in WPF Development
After you've got what you need, it's time to rock!
  1. 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 insideC:\Emgu\emgucv-windows-x86 2.2.1.1150\bin some DLLs and sample programs. You can see a simple face detection app Example.FaceDetection.exeand you'll see something like the first picture in this post.
...
image
...
8. Here is the result of our work:
image
...
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;
image
And the after;
image
Once the dependences are in place and the file name fixed, this ran like a charm and really did make facial detection look easy...
SNAGHTML5a7d65c
SNAGHTML5a7f202
If you've been wondering how to do face detection, this project is one you'll want to check out...




0 komentar:

Post a Comment

C# :: Face Detection with Emgu CV in C# and WPF