Figure 6-9: The 7-by-5 image of
Figure 6-8 shown numerically at left (with the origin assumed to be the upper-left ) and converted to an (8-
by-6) integral image at right
cv::integral(), for Standard Summation Integral
The different forms of integral are (somewhat confusingly) distinguished in the C++ API only by their
arguments. The form that computes the basic sum has only three.
void cv::integral(
cv::InputArray image, // Input array
cv::OutputArray sum, // Output sum results
int sdepth = -1 // Depth for results (e.g., cv::F32)
);
The first and second are the input and result images. If the input image is of size 𝑊-by-!𝐻, then the output
image will be of size (𝑊 + 1)-by-(𝐻 + 1).
22
The third argument sdepth specifies the desired depth of
the sum (destination) im ...