Type Method

morphologyMinimumFilter

Blurs a circular area by reducing contrasting pixels.

Declaration

+ (CIFilter<CIMorphologyMinimum> *)morphologyMinimumFilter;

Return Value

The blurred image.

Discussion

This method applies the morphology minimum filter to an image. The effect targets a circular 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 reduces the pixels with contrasting colors to take up less of the working area. The effect is then repeated throughout the image.

The morphology minimum filter uses the following properties:

radius

A float representing the area of effect as an NSNumber.

inputImage

A CIImage representing the input image to apply the filter to.

The following code creates a filter that adds a blur that adds darkness to the input image:

    func morphologyMinimum(inputImage: CIImage) -> CIImage? {

        let morphologyMinimumFilter = CIFilter.morphologyMinimum()
        morphologyMinimumFilter.inputImage = inputImage
        morphologyMinimumFilter.radius = 5
        return morphologyMinimumFilter.outputImage
    }
Two photographs of a beach at sunset with multiple palm trees. The photo on the left is clear and crisp. In the photo on the right, a morphology minimum blur has been applied, making the image hazy and the edges of the palm trees darker and less distinct.

See Also

Filters

+ bokehBlurFilter

Applies a bokeh effect to an image.

+ boxBlurFilter

Applies a square-shaped blur to an area of an image.

+ discBlurFilter

Applies a circle-shaped blur to an area of an image.

+ gaussianBlurFilter

Blurs an image with a Gaussian distribution pattern.

+ maskedVariableBlurFilter

Blurs a specified portion of an image.

+ medianFilter

Calculates the median of an image to refine detail.

+ morphologyGradientFilter

Detects and highlights edges of objects.

+ morphologyMaximumFilter

Blurs a circular area by enlarging contrasting pixels.

+ morphologyRectangleMaximumFilter

Blurs a rectangular area by enlarging contrasting pixels.

+ morphologyRectangleMinimumFilter

Blurs a rectangular area by reducing contrasting pixels.

+ motionBlurFilter

Creates motion blur on an image.

+ noiseReductionFilter

Reduces noise by sharpening the edges of objects.

+ zoomBlurFilter

Creates a zoom blur centered around a single point on the image.