MPSImageIntegral
A filter that calculates the sum of pixels over a specified region in an image.
Declaration
class MPSImageIntegralOverview
The value at each position is the sum of all pixels in a source image rectangle, sumRect. The following listing shows the pseudocode used to calculate sumRect.
Listing 1. Pseudocode for sumRect
sumRect.origin = filter.offset
sumRect.size = dest_position - filter.clipRect.originIf the channels in the source image are normalized, half-float or floating values, the destination image is recommended to be a 32-bit floating-point image. If the channels in the source image are integer values, it is recommended that an appropriate 32-bit integer image destination format is used.