Integral image
J = integralImage(I)
J = integralImage(I,orientation)
computes
the integral image with the specified orientation.J
= integralImage(I
,orientation
)
An integral image lets you rapidly calculate summations over image subregions. Use of integral images was popularized by the ViolaJones algorithm [1]. Integral images facilitate summation of pixels and can be performed in constant time, regardless of the neighborhood size.

Integral image. The function zeropads the top and left side
of the integral image. The class of the output is Such
sizing facilitates easy computation of pixel sums along all image
boundaries. The integral image, 
[1] Viola, Paul and Michael J. Jones, "Rapid Object Detection using a Boosted Cascade of Simple Features", Proceedings of the 2001 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2001. Volume: 1, pp.511–518.