Assembly: AForge.Imaging (in AForge.Imaging.dll) Version: 184.108.40.206 (220.127.116.11)
public class IntegralImage
The class implements integral image concept, which is described by Viola and Jones in: P. Viola and M. J. Jones, "Robust real-time face detection", Int. Journal of Computer Vision 57(2), pp. 137–154, 2004.
"An integral image I of an input image G is defined as the image in which the intensity at a pixel position is equal to the sum of the intensities of all the pixels above and to the left of that position in the original image."
The intensity at position (x, y) can be written as:
x y I(x,y) = SUM( SUM( G(i,j) ) ) i=0 j=0
// create integral image IntegralImage im = IntegralImage.FromBitmap( image ); // get pixels' mean value in the specified rectangle float mean = im.GetRectangleMean( 10, 10, 20, 30 )