saliencyMap()
Creates a saliency map from an image.
Declaration
class func saliencyMap() -> any CIFilter & CISaliencyMapReturn 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:
inputImageAn 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]