Class

MPSImageIntegralOfSquares

A filter that calculates the sum of squared pixels over a specified region in an image.

Declaration

@interface MPSImageIntegralOfSquares : MPSUnaryImageKernel

Overview

The value at each position is the sum of all squared pixels in a source image rectangle, sumRect. Listing 1 shows the pseudocode used to calculate sumRect.

Listing 1

Pseudocode for sumRect

sumRect.origin = filter.offset
sumRect.size = dest_position - filter.clipRect.origin

If 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.

Relationships

Inherits From

See Also

Image Integral Filters

MPSImageIntegral

A filter that calculates the sum of pixels over a specified region in an image.