Feature-based recognition

In this technique, we go for certain features and based on that we do the recognition. Use of the haar feature-based cascade for face detection is an effective object detection method proposed by Paul Viola and Michael Jones in their paper "Rapid Object Detection using a Boosted Cascade of Simple Features" in 2001. It is a machine learning based approach where a cascade function is trained against a set of positive and negative images. Then it is used to detect objects in other images.

The algorithm initially needs a lot of positive images. In our case, these are images of faces, while negative images which don't contain images of faces. Then we need to extract features from it.

For this purpose, the haar features shown in the following figure are used. Each of the features is a single value obtained by subtracting the sum of pixels under a white rectangle from sum of pixels under a black rectangle:

Haar features

The haar classifiers need to be trained for face, eyes, smile, and so on. OpenCV contains a set of predefined classifiers. They are available in the C:opencvuildetchaarcascades folder. Now that we know how we can approach face detection, we are going to use the pre-trained haar classifiers for face detection.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.71.28