Function File: integralImage (img)
Function File: integralImage (img, orient)

Calculate the integral image.

img is the input image for integral image calculation. If it is an RGB image (or higher dimension), each 2D plane is treated separately.

orient determines which integral image will be calculated. Its value must be the string "upright" (default) or "rotated".

The value of the integral image in the "upright" orientation, also called "summed-area table", at any poing (x, y) is the sum of all the pixels above and to the left of (x, y), inclusive, see [1].

When using the "rotated" option, Rotated Summed Area Table (RSAT) is calculated. It is defined as the sum of the pixels of a 45 degrees rotated rectangle with the bottom most corner at (x,y):

RSAT(x,y) = RSAT(x-1,y-1) + RSAT(x+1,y-1) - RSAT(x,y-2) + I(x,y) + I(x,y-1)

(see [2])

References:

[1] Viola, Paul; Jones, Michael (2001). "Robust Real-time Object Detection". Compaq Cambridge Research Laboratory (CRL) Technical Report, February 2001. http://www.hpl.hp.com/techreports/Compaq-DEC/CRL-2001-1.pdf

[2] Lienhart, Kuranov and Pisarevsky (2002). "Empirical Analysis of Detection Cascades of Boosted Classifiers for Rapid Object Detection". Microprocessor Research Lab (MRL) Technical Report, May 2002. http://www.multimedia-computing.de/mediawiki/images/5/52/MRL-TR-May02-revised-Dec02.pdf

See also: cumsum.

Package: image