A Haar cascade uses rectangular features to detect an object. It uses rectangles of different sizes to calculate different line and edge features. The rectangle contains some black and white regions, as shown in the following figure, and they are centered at different positions in an image:
The idea behind the Haar-like feature selection algorithm is to compute the difference between the sum of white pixels and the sum of black pixels inside the rectangle.
The main advantage of this method is the fast sum computation using the integral image. This makes a Haar cascade ideal for real-time object detection. It requires less time for processing an image than algorithms like SURF described previously. This algorithm can also be implemented on embedded systems, like Raspberry Pi, because it is less computationally intensive and has less memory...