Camera Face Detection in C# Using Emgu CV (OpenCV in .NET) and WPF Download WPF Face Detection Solution File 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. This what you need to follow this tutorial: Microsoft Visual Studio 2010. After you've got what you need, it's time to rock! First thing you should do is installing Emgu CV. Next, let's open your Visual Studio and create a new WPF Project. Now, copy code below to make our user experience. Next, let's code it! using System; using System.Windows; using System.Windows.Controls; using System.Windows.Media.Imaging; using System.Windows.Threading; using Emgu.CV.Structure; using Emgu.CV; using System.Runtime.InteropServices; Initialize two objects Capture and HaarCascade. This last part is the routine. Here is the result of our work: Okay, I think that's all I can do in this post.
Cascade Classifier — OpenCV v2.4.2 documentation Goal In this tutorial you will learn how to: Use the CascadeClassifier class to detect objects in a video stream. Particularly, we will use the functions:load to load a .xml classifier file. It can be either a Haar or a LBP classiferdetectMultiScale to perform the detection. Code This tutorial code’s is shown lines below. Result Here is the result of running the code above and using as input the video stream of a build-in webcam: Remember to copy the files haarcascade_frontalface_alt.xml and haarcascade_eye_tree_eyeglasses.xml in your current directory. Help and Feedback You did not find what you were looking for?
Evolution computations on C# Introduction There are many different research works done in the area of evolution computation, what caused a variety of different evolutional algorithms to appear. Many researchers studied these methods extensively and tried their application to the great range of tasks. It is a known fact, that there are many different problems exist, which impossible to solve precisely within a reasonable period of time using traditional methods. Also there are many problems, which do not have a formalized solution approach, what makes their solution very hard or even impossible using traditional methods. As an example is Traveling Salesman Problem (TSP), where it is required to find a shortest path around specified amount of cities, visiting all of them only once and returning back to the start city in the end. In this article, a C# library for evolution computation will be discussed. Evolution computations There are several selection operators exists [1 ]. Using the library Function Optimization
FaceDetection Note: This tutorial uses the OpenCV 1 interface and (as far as I can tell) is not compatible with the version of haarcascade_frontalface_alt.xml included in the OpenCV 2 code source. See for the OpenCV 2 version of the tutorial which is compatible with the current XML files. How to compile and run the facedetect.c is one of the frequently asked question in the OpenCV Yahoo! Groups. I'll try to explain it to my best. Feel free to edit it if you have some more details.. Haar Like Features: What is that? A recognition process can be much more efficient if it is based on the detection of features that encode some information about the class to be detected. The object detector of OpenCV has been initially proposed by Paul Viola and improved by Rainer Lienhart. After a classifier is trained, it can be applied to a region of interest (of the same size as used during the training) in an input image. Ok.
AForge.NET open source framework Introduction It so happened that from time to time during the past two years I was working on several research projects in the areas of Computer Vision and Artificial Intelligence. As a result of this work, a lot of code was produced and several articles on Code Project were published that describe some of these areas. Publishing these articles, I discovered that these areas are interesting not only to me, but to a wide range of developers as well. From the time of my first publication on Code Project, I received many different e-mails from many interesting people all over the world, who were applying some of my code to a great number of applications. The aim of this article is to make its publication to be an official opening of a new open source project AForge.NET - a C# framework for researchers in different areas of Computer Vision and Artificial Intelligence. Image processing Neural networks Evolution algorithms Image processing library Neural networks library Function optimization
Face Detection and Face Recognition with Real-time Training from a Camera To improve the recognition performance, there are MANY things that can be improved here, some of them being fairly easy to implement. For example, you could add color processing, edge detection, etc. You can usually improve the face recognition accuracy by using more input images, atleast 50 per person, by taking more photos of each person, particularly from different angles and lighting conditions. If you cant take more photos, there are several simple techniques you could use to obtain more training images, by generating new images from your existing ones: You could create mirror copies of your facial images, so that you will have twice as many training images and it wont have a bias towards left or right. You could translate or resize or rotate your facial images slightly to produce many alternative images for training, so that it will be less sensitive to exact conditions. You could add image noise to have more training images that improve the tolerance to noise.
Image Processing Lab in C# Introduction Image Processing Lab is a simple tool for image processing, which includes different filters and tools to analyze images available in the AForge.NET framework. It's easy to develop your own filters and to integrate them with the code or use the tools in your own application. You can create (save and load) your own convolution filters or filters based on standard mathematical morphology operators. A preview window allows you to view the results of changing filter parameters on the fly. A PhotoShop-like histogram allows you to get information about mean, standard deviation, median, minimum and maximum values. The program allows you to copy to or paste from clipboard, save and print images. Using the Code Most filters are designed to work with 24bpp RGB images or with grayscale images. System.Drawing.Bitmap image = (Bitmap) Bitmap.FromFile( fileName ); AForge.Imaging.Image.FormatImage( ref image ); It is easy to apply any filter to your image: HSL Filters Fourier Transformation
Tutorial: OpenCV haartraining (Rapid Object Detection With A Cascade of Boosted Classifiers Based on Haar-like Features) - Naotoshi Seo Tutorial: OpenCV haartraining (Rapid Object Detection With A Cascade of Boosted Classifiers Based on Haar-like Features) Objective The OpenCV library provides us a greatly interesting demonstration for a face detection. Furthermore, it provides us programs (or functions) that they used to train classifiers for their face detection system, called HaarTraining, so that we can create our own object classifiers using these functions. However, I could not follow how OpenCV developers performed the haartraining for their face detection system exactly because they did not provide us several information such as what images and parameters they used for training. My working environment is Visual Studio + cygwin on Windows XP, or on Linux. FYI: I recommend you to work haartrainig with something different concurrently because you have to wait so many days during training (it would possibly take one week). A picture from the OpenCV website History Tag: SciSoftware ComputerVision FaceDetection OpenCV .
AForge.NET :: Computer Vision, Artificial Intelligence, Robotics Creative Inspiration: 10 Principles of Design Graphic design is much more than learning how to use the tools within Photoshop. It requires an intimate understanding of the relationship between different objects. This series of paper art poster designs by Efil Türk covers 10 design principles that are core to any designer's success. 1. Balance "Balance as a design principle, places the parts of a visual in an aesthetically pleasing arrangement." 2. "Visual hierarchy is the order in which the human eye perceives what it sees. 3. "Pattern uses the art elements in planned or random repetition to enhance surfaces or paintings." 4. "Rhythm is the repetition of visual movement of the elements-colors, shapes, values, forms, spaces, texture." 5. "Space is an empty place or surface in or around a work of art. 6. "Proportion refers to the relative size and scale of the various elements in a design. 7. "It creates a focal point in a design; it is how we bring attention to what is most important." 8. 9. 10.
Motion Detection Algorithms Introduction There are many approaches for motion detection in a continuous video stream. All of them are based on comparing of the current video frame with one from the previous frames or with something that we'll call background. In this article, I'll try to describe some of the most common approaches. In description of these algorithms I'll use the AForge.NET framework, which is described in some other articles on Code Project: [1], [2]. The demo application supports the following types of video sources: AVI files (using Video for Windows, interop library is included); updating JPEG from internet cameras; MJPEG (motion JPEG) streams from different internet cameras; local capture device (USB cameras or other capture devices, DirectShow interop library is included). Algorithms One of the most common approaches is to compare the current frame with the previous one. But most cameras produce a noisy image, so we'll get motion in such places, where there is no motion at all. Motion Alarm