Blurs a rectangular area by enlarging contrasting pixels.
- iOS 13.0+
- macOS 10.15+
- tvOS 13.0+
- Core Image
The blurred image.
This method applies the morphology rectangle maximum filter to an image. The effect targets a rectangular section of the image, calculating the median color values to find colors that make up more than half the working area. Using this calculation, the effect enlarges the pixels with contrasting colors to take up more of the working area. The effect is then repeated throughout the image.
The morphology rectangle maximum filter uses the following properties:
floatrepresenting the width in pixels of the working area as an
floatrepresenting the height in pixels of the working area as an
CIImagerepresenting the input image to apply the filter to.
The following code creates a filter that adds a blur to the input image while brighting the palm trees: