Contents

saliencyMap()

Creates a saliency map from an image.

Declaration

class func saliencyMap() -> any CIFilter & CISaliencyMap

Return Value

The modified image.

Discussion

This method applies the saliency map filter to an image. The effect generates a saliency map representation of the input image.

The saliency map filter uses the following properties:

inputImage

An image with the type CIImage.

The following code creates a filter that produces an image that’s easier for computers to analyze:

func saliencyMap(inputImage: CIImage) -> CIImage {
    let saliencyMapFilter = CIFilter.saliencyMap()
    saliencyMapFilter.inputImage = inputImage
    return saliencyMapFilter.outputImage!
}

[Image]

See Also

Filters