As we learned in the previous recipes, a histogram constitutes a reliable global representation of an object's appearance. In this recipe, we will demonstrate the usefulness of integral images by showing you how we can locate an object in an image by searching for an image area that presents a histogram similar to a target object. We accomplished this in the Using the Mean Shift algorithm to find an object recipe by using the concepts of histogram backprojection and local search through mean shift. This time, we will find our object by performing an explicit search for regions of similar histograms over the full image.
In the special case where an integral image is used on a binary image made of 0 and 1