Haar Cascades

Searching every part of a picture can be expensive, especially when most regions contain nothing relevant. A cascade uses inexpensive checks to reject unlikely regions before applying more demanding tests.

14 sections · 15 questions · 4 coding challenges

1 / 14

Why Spend the Same Effort on an Empty Wall and a Possible Face?

BOTIE

Searching an image for faces means examining many windows, most of which contain no face at all. If every window requires an expensive classifier, the cost of rejecting obvious background can dominate the work.

Viola and Jones' 2001 detector combined quickly computed rectangular features, boosting, and a cascade of classifiers. A central practical idea was to reject easy negative windows early, leaving more computation for the smaller number that remained plausible.

A rectangular feature compares brightness totals in adjacent regions. An integral image makes those totals quick to obtain. Early cascade stages use a few selected tests; only passing windows continue to later stages. The cascade must be trained to retain likely positives, because a face rejected early never reaches the more detailed checks.

Sources for this history