Module imageproc::integralimage [] [src]

Functions for computing integral images and running sums of rows and columns.

Functions

column_running_sum

Computes the running sum of one column of image, padded at the top and bottom. The padding is by continuity. Takes a reference to buffer so that this can be reused for all columns in an image.

integral_image

Computes the integral image of an 8bpp grayscale image. I is the integral image of an image F if I(x, y) is the sum of F(x', y') for x' <= x, y' <= y. i.e. each pixel in the integral image contains the sum of the pixel intensities of all input pixels that are above it and to its left. The integral image has the helpful property that it lets us compute the sum of pixel intensities from any rectangular region in the input image in constant time. Specifically, given a rectangle in F with clockwise corners A, B, C, D, with A at the upper left, the total pixel intensity of this rectangle is I(C) - I(B) - I(D) + I(A).

padded_integral_image

Computes the integral image of the result of padding image with its boundary pixels for x_padding columns on either side and y_padding rows at its top and bottom. Returned image has width image.width() + 2 * x_padding and height image.height() + 2 * y_padding.

row_running_sum

Computes the running sum of one row of image, padded at the beginning and end. The padding is by continuity. Takes a reference to buffer so that this can be reused for all rows in an image.