errorImage =Now we can go look at the results of the S-CIELAB calculation .
scielab(sampPerDeg, img1LMS, img2LMS, whitepoint, imageformat);
The results in errorImage calculated above are in CIELAB delta E units. There is also the option to use the newer CIE94 color difference formula to calculate delta E values after the S-CIELAB spatial filtering. To use this option, you need to provide an additional argument k to the scielab.m function:
errorImage =If k is given as a 3 vector, use this as the k94 vector in the CIE94 calculation. If k is given in any other form, use the default k=[1 1 1]. For more details on how the CIE94 delta E is calculated, you can take a look at the deltaE94.m file.
scielab(sampPerDeg, img1LMS, img2LMS, whitepoint, imageformat, k);
The S-CIELAB spatial filtering is implemented as a modular extension to the CIELAB delta E calculation. Therefore, you can also ask it to only return spatial filtered images without performing the delta E calculations. The outputs are in Poirson-Wandell opponent representation, which can be easily transformed to XYZ format. Newer/other color difference formulae can then be calculated on the filtered output. To get the filtered output, pass the arguments to scielab.m as follows:
filtOpp1 = scielab(sampPerDeg, img1LMS, imageformat);The outputs filtOpp1 and filtOpp2 contain opponent representations of the s-cielab filtered images. They can be converted to XYZ format by:
filtOpp2 = scielab(sampPerDeg, img2LMS, imageformat);
filtXYZ1 = changeColorSpace(filtOpp1, cmatrix('opp2xyz'));The results filtXYZ1 and filtXYZ2 can be used to calculate newer delta E values, or other color difference values such as CIELUV deltaE.
filtXYZ2 = changeColorSpace(filtOpp2, cmatrix('opp2xyz'));