labDeltaE()
Compares an image’s color values.
Declaration
class func labDeltaE() -> any CIFilter & CILabDeltaEReturn Value
The modified image.
Discussion
This method applies the Lab ΔE filter to an image. The effect creates an image based on the visual color differences between the two input images. The resulting image contains ΔE 1994 values between 0.0 and 100.0.
The Lab ΔE filter uses the following properties:
inputImageAn image with the type CIImage.
image2An image with the type CIImage the system uses for comparison.
The following code creates a filter that removes the background from the input image:
func labDeltaE(inputImage: CIImage, inputImage2: CIImage) -> CIImage {
let labDeltaEFilter = CIFilter.labDeltaE()
labDeltaEFilter.inputImage = inputImage
labDeltaEFilter.image2 = inputImage2
return labDeltaEFilter.outputImage!
}[Image]