This chapter shows a very interesting feature of OpenCV—detecting faces in an image or a video stream. In the latter case, we call it face tracking. In order to do so, this chapter dives into machine-learning algorithms, specifically supervised learning with boosting. We will cover the Viola-Jones classifier and its theory as well as the details on how to use the face-trained classifiers that are bundled with OpenCV.
In this chapter, we will be covering the following topics:
The boosting theory
Viola-Jones classifier
Detecting faces
Learning new objects
By the end of this chapter, you will be able to understand the theory behind face classifiers through boosting, and the Viola-Jones classifier. You will also know how to use straightforward face classifiers. Besides, you will be able to create your own object classifier for different objects.