-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR: Implement support for *HyCH* large color difference #1307
Conversation
I think I'm going to need a bit of help with HyCH since it's a bit more complicated than HyAB, and I don't work in this field so I'm not confident in my knowledge. So first, I'm not sure what's the best way to implement this. If I'm interpreting the equation in the paper correctly, I think HyCH would duplicate the majority of code in delta_E_CIE2000. Should both delta_E_CIE2000 and delta_E_HyCH both call a helper function then to avoid duplication? Also, Equation 6 for CD4 is notated using L*C*H* in the paper, but I'm seeing L'C'H' used in other sources and also in this package. I'm assuming when the paper uses ΔC*, they mean ΔC' because of the k_C * S_C denominator, but I'm not confident in this. And also since the paper doesn't provide any examples, I can't find any sample data to compare results to verify my implementation. |
Hey @mesvam, I squashed your commits from the previous branch so you would need to create a new branch from I will take a look at the paper but reading what you wrote LCH should really just be Lab converted to LCHab. We have it there colour/colour/models/__init__.py Line 470 in 363145a
|
I will need to add an intermediate definition so that we do not copy-paste the entire CIE 2000 code here. |
Hello, I added a new Let us know how it goes! Cheers, Thomas |
Thanks a lot, I will merge in a staging branch and doctor the history a bit. |
59408c0
into
colour-science:hych_staging
So I contacted the authors, who kindly provided some test data to compare. I verified that this implementation matched their results to within numerical precision, with the exception of an optional hue rotation term. You can cherry-pick this mesvam@2730318 if you want to add it to the test suite |
Summary
Preflight
Code Style and Quality
colour
,colour.models
.Documentation