Calculate the 3D integral image.
img is the input image for 3D integral image calculation.
The value of the 3D integral image is J = cumsum (cumsum (cumsum (I), 2), 3) with padding. The padding adds a zeros plane, zero rows and zero column, so size (J) = size (I) + 1.
See also: integralImage, cumsum.
Package: image