A filter that finds the minimum pixel value in a rectangular region centered around each pixel in the source image.
- iOS 9.0+
- macOS 10.13+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- Metal Performance Shaders
MPSImage behaves like the
MPSImage filter, except that the intensity at each position is calculated relative to a different value before determining which is the maximum pixel value, allowing for shaped, non-rectangular morphological probes.
Listing 1 shows pseudocode for the calculation used to return each pixel value.
The definition of the
MPSImage filter is different from its
v counterpart (
MPSImage). This allows
MPSImage to use the same filter, making open and close operators easier to write.
A filter that contains all zeros is identical to a
MPSImage filter. The center filter element is assumed to be
0, to avoid causing a general lightening of the image. The
edge property value is assumed to always be
MPSImage for this filter.