Understanding Haar cascades
Haar cascades are cascade classifiers that are based on Haar features. What is a cascade classifier? It is simply a concatenation of a set of weak classifiers that can be used to create a strong classifier. What do we mean by weak and strong classifiers? Weak classifiers are classifiers whose performance is limited. They don't have the ability to classify everything correctly. If you keep the problem really simple, they might perform at an acceptable level. Strong classifiers, on the other hand, are really good at classifying our data correctly. We will see how it all comes together in the next couple of paragraphs. Another important part of Haar cascades is Haar features. These features are simple summations of rectangles and differences of those areas across the image. Let's consider the following diagram:
If we want to compute the Haar features for region ABCD, we just need to compute the difference between the white pixels and the blue pixels in that region...