Implement Metamerism support #1369
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
As discussed with @KelSolaar , I wanted to add support for Metamerism calculation.
While the relevant delta_E equations are all available, there was so far not an option to get access to the intermediate delta Lab or delta LCH terms, which some metamerism formulas need. I added this support using a return_deltas boolean flag.
The implemented metamerism index allows to compute metamerism using CIE 1976, CIE 1994, CIE 2000, CMC, and DIN99. We can also either compute the metamerism using the intermediate deltas of the delta E computation or directly the delta E itself.
Everything should be properly documented, I added docstrings and unit tests where necessary !
Preflight
Code Style and Quality
colour,colour.models.3 tests failed, all related to image.io -- which was not touched / modified in this PR at all. See below output
=========================== short test summary info ===========================
FAILED colour/io/image.py::colour.io.image.read_image_Imageio
FAILED colour/io/tests/test_image.py::TestWriteImageImageio::test_write_image_Imageio_exr
FAILED colour/io/tests/test_image.py::TestReadImageImageio::test_read_image_Imageio
========== 3 failed, 3632 passed, 17 skipped, 208 warnings in 45.99s ==========
Documentation
Best,
Lasse