A simple rectangular Haar-like feature can be defined as the difference of the sum of pixels of areas inside the rectangle, which can be at any position and scale within the original image. This modified feature set is called 2-rectangle feature. Viola and Jones also defined 3-rectangle features and 4-rectangle features. The values indicate certain characteristics of a particular area of the image. Each feature type can indicate the existence (or absence) of certain characteristics in the image, such as edges or changes in texture. For example, a 2-rectangle feature can indicate where the border lies between a dark region and a light region.
One of the contributions of Viola and Jones was to use summed-area tables,4 which they called integral images. Integral images can be defined as two-dimensional lookup tables in the form of a matrix with the same size of the original image. Each element of the integral image contains the sum of all pixels located on the up-left region of the original image (in relation to the element's position). This allows to compute sum of rectangular areas in the image, at any position or scale, using only four lookups:
where points A , B , C , D {\displaystyle A,B,C,D} belong to the integral image I {\displaystyle I} , as shown in the figure.
Each Haar-like feature may need more than four lookups, depending on how it was defined. Viola and Jones's 2-rectangle features need six lookups, 3-rectangle features need eight lookups, and 4-rectangle features need nine lookups.
Lienhart and Maydt5 introduced the concept of a tilted (45°) Haar-like feature. This was used to increase the dimensionality of the set of features in an attempt to improve the detection of objects in images. This was successful, as some of these features are able to describe the object in a better way. For example, a 2-rectangle tilted Haar-like feature can indicate the existence of an edge at 45°.
Messom and Barczak6 extended the idea to a generic rotated Haar-like feature. Although the idea is sound mathematically, practical problems prevent the use of Haar-like features at any angle. In order to be fast, detection algorithms use low resolution images introducing rounding errors. For this reason rotated Haar-like features are not commonly used.
Viola and Jones, "Rapid object detection using a boosted cascade of simple features", Computer Vision and Pattern Recognition, 2001 https://www.merl.com/publications/docs/TR2004-043.pdf ↩
Papageorgiou, Oren and Poggio, "A general framework for object detection", International Conference on Computer Vision, 1998. ↩
Crow, F, "Summed-area tables for texture mapping Archived 2017-08-08 at the Wayback Machine", in Proceedings of SIGGRAPH, 18(3):207–212, 1984 https://classes.soe.ucsc.edu/cmps160/Fall05/papers/p207-crow.pdf ↩
Lienhart, R. and Maydt, J., "An extended set of Haar-like features for rapid object detection Archived 2017-12-15 at the Wayback Machine", ICIP02, pp. I: 900–903, 2002 http://www.videoanalysis.org/Prof._Dr._Rainer_Lienhart/Publications_files/ICIP2002.pdf ↩
Messom, C.H. and Barczak, A.L.C., "Fast and Efficient Rotated Haar-like Features Using Rotated Integral Images", Australian Conference on Robotics and Automation (ACRA2006), pp. 1–6, 2006 https://web.archive.org/web/20180105011331/https://pdfs.semanticscholar.org/6c95/6a107ba358d873a169a8678080145dcc3d5b.pdf ↩