Understanding detection with cascade classifiers
A cascade is a series of tests or stages, which differentiate between a positive and negative class of objects, such as face and non-face. For a positive classification, a patch of an image must pass all stages of the cascade. Conversely, if the patch fails any stage, the classifier immediately makes a negative classification.
A patch or window of an image is a sample of pixels around a given position and at a given magnification level. A cascade classifier takes windows of the image at various positions and various magnification levels, and for each window it runs the stages of the cascade. Often, positive detections occur in multiple, overlapping windows. These overlapping positive detections are called neighbors, and they imply a greater likelihood of a true positive. For example, a real face still looks like a face if we move or resize the frame around it slightly.
By now, you might be wondering exactly how we design a cascade's stages...