Skip to content
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

Fix DE_94 & DE_CMC color difference metrics #461

Merged
merged 1 commit into from
May 8, 2021

Conversation

kimikage
Copy link
Collaborator

@kimikage kimikage commented Mar 2, 2021

This makes DE_94 and DE_CMC quasimetric. Within those metrics, the first argument of colordiff is taken as the reference color. This adds the weight parameters k1 and k2 to DE_94.

This also makes the omission of the metric constructor arguments more flexible.

Edit: DE_94 seems to have a similar problem. I will fix it as well. Done

Fixes #438

@codecov
Copy link

codecov bot commented Mar 2, 2021

Codecov Report

Merging #461 (598f2fb) into master (65c4e5a) will increase coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #461      +/-   ##
==========================================
+ Coverage   91.21%   91.30%   +0.09%     
==========================================
  Files           9        9              
  Lines         956      955       -1     
==========================================
  Hits          872      872              
+ Misses         84       83       -1     
Impacted Files Coverage Δ
src/differences.jl 94.73% <100.00%> (+1.56%) ⬆️
src/conversions.jl 99.32% <0.00%> (-0.68%) ⬇️
src/utilities.jl 97.26% <0.00%> (-0.04%) ⬇️
src/parse.jl 93.50% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65c4e5a...598f2fb. Read the comment docs.

@kimikage kimikage marked this pull request as ready for review April 29, 2021 10:33
@kimikage kimikage marked this pull request as draft April 30, 2021 07:05
@kimikage kimikage changed the title Fix DE_CMC color difference metric Fix DE_94 & DE_CMC color difference metrics Apr 30, 2021
@kimikage kimikage marked this pull request as ready for review April 30, 2021 12:36
This makes `DE_94` and `DE_CMC` quasimetric.
Within those metrics, the first argument of `colordiff` is taken as the reference color.
This adds the weight parameters `k1` and `k2` to `DE_94`.
This also makes the omission of the metric constructor arguments more flexible.
Comment on lines -368 to +374
c isa XYZ && return ai
c isa XYZ && return c
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😭

I am not going to backport this to v0.12. As a workaround, if the second argument is XYZ, please convert it to something other than XYZ (e.g. xyY).

@kimikage kimikage merged commit 8474f07 into JuliaGraphics:master May 8, 2021
@kimikage kimikage deleted the de_cmc branch May 8, 2021 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-standard implementation of DE_CMC and DE_94
1 participant