Parametrized contrast #217
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.
This is based on #216 to avoid merge conflicts.
This branch contains two related changes: modifying Weber contrast and adding Stevens contrast. I would be happy to split this into two separate pull requests, but I wanted to first ask if general direction is something you are interested in.
Contrast depends a lot on viewing conditions. Therefore I think it makes sense to have parametrized contrast algorithms.
I propose to have two parametrized contrast algorithms: Weber (offset) and Stevens (exponent and offset).
Here's the issue: It would be great if we could give clear guidance on how to pick these parameters. Unfortunately there seems to be a bit of confusion around their exact physical interpretations and values.
What I call "offset" is called "Lambient" in the references Hwang/Peli paper. In other places it is called "flare". This interpretations is already criticised by the docs:
This offset has a very different effect for Weber than for Steven though. Using an offset of 0.05 for Weber is quite similar to using an offset of 0.0025 and and exponent of 1/3 (used e.g. in CIELab and OkLab) for Stevens:
Due to all this confusion, I think it might be best to stick with the neutral term "offset".
I understand if this is too experimental for you and you decide to reject this. However, I think it could be beneficial for the discussion to have the low level tools to experiment with different parameters, even if we don't know the best values yet.