CIFilter.labDeltaE().outputImage shows 255 - max color difference:

the above image has dark gray background in preview of the actual image which has transparent background:
https://github.com/paulz/ViewSnapshots/raw/main/AppTests/Snapshots/ToggleView-labDelta.png

Input images:
inputImage
https://github.com/paulz/ViewSnapshots/raw/main/AppTests/Snapshots/ToggleView-intel.png:

image2
https://github.com/paulz/ViewSnapshots/raw/main/AppTests/Snapshots/ToggleView-m1.png

Verified by test:
|
func testLargeDeltaEvenColorDifferenceIsLessThen2Percent() throws { |
|
let delta = try calculateDelta("ToggleView") |
|
XCTAssertEqual(areaMaximum(delta.delta), [255, 255, 255, 255]) |
|
|
|
let difference = try XCTUnwrap(diff(delta.first, delta.second).outputImage) |
|
XCTAssertEqual(ImageComparisonResult(difference: difference).maxColorDifference(), 0.015625) |
|
} |
showing that CIFilter.differenceBlendMode is less than 1.5625%
while CIFilter.labDeltaE shows difference RGBA[255, 255, 255, 255]
CIFilter.labDeltaE().outputImageshows 255 - max color difference:the above image has dark gray background in preview of the actual image which has transparent background:

https://github.com/paulz/ViewSnapshots/raw/main/AppTests/Snapshots/ToggleView-labDelta.png
Input images:
inputImagehttps://github.com/paulz/ViewSnapshots/raw/main/AppTests/Snapshots/ToggleView-intel.png:
image2https://github.com/paulz/ViewSnapshots/raw/main/AppTests/Snapshots/ToggleView-m1.png
Verified by test:
ViewSnapshots/AppTests/PerceptualDifferencesTest.swift
Lines 66 to 72 in aca7557
showing that
CIFilter.differenceBlendModeis less than 1.5625%while
CIFilter.labDeltaEshows differenceRGBA[255, 255, 255, 255]