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

Add new illuminants for color conversion #5223

Open
BierretA opened this issue Feb 5, 2021 · 6 comments
Open

Add new illuminants for color conversion #5223

BierretA opened this issue Feb 5, 2021 · 6 comments

Comments

@BierretA
Copy link
Contributor

BierretA commented Feb 5, 2021

Description

For users of the R programming language, color space conversions can be performed using the standard function grDevices::convertColor, which is part of R-core.
The white points for this function are:

Name x y X Y Z
A 0.44757 0.40745 1.0984661 1.0000000 0.3558228
B 0.34842 0.35161 0.9909274 1.0000000 0.8531327
C 0.31006 0.31616 0.980706 1.000000 1.182249
D50 0.34574 0.35867 0.9639501 1.0000000 0.8241280
D55 0.33250 0.34761) 0.9565317 1.0000000 0.9202555
D65 0.3137 0.3291 0.9532057 1.0000000 1.0853844
E 1/3 1/3 1 1 1

White points B and C are not implemented in skimage.
D50, D55 and D65 white points in R do not match the XYZ coordinates of the illuminants in skimage colorconv.py.

Adding "B" and "C" white points and adding "R" as a new observer for the "D50", "D55" and "D65" illuminants would improve compatibilty with color conversions performed in R.

@grlee77
Copy link
Contributor

grlee77 commented Feb 8, 2021

Hi @BierretA, is this something you are interested in contributing or is this just a feature request? It sounds reasonable, but I am not so familiar with the color module, specifically. It would be good if any other core devs herecould chime in on this.

There are also some related projects like colour and `colorspacious, that provide some functionality we currently don't have. I am not sure if they have an implementation matching the issue raised here or not, though. There was some past talk in #1991 about how scikit-image could possibly port any unique functionality here to one of those and then use it here as a dependency. I don't think anyone is actively working on that at the moment, though.

@BierretA
Copy link
Contributor Author

BierretA commented Feb 8, 2021

I am new to open source but I would be happy to help. If my suggestion is of interest, I can try doing a PR. Adding a few illuminants should be easy enough.

@grlee77
Copy link
Contributor

grlee77 commented Feb 8, 2021

Great, we are happy to help new contributors.

You may want to wait a few days for any other feedback before starting the work.

@jni
Copy link
Member

jni commented Feb 9, 2021

I'm in the same boat as @grlee77: don't know much about colorspaces, but very happy to help new contributors! 😊 The feature makes sense, I don't think there'll be much resistance from the other core devs.

@FirefoxMetzger
Copy link
Contributor

You are talking about updating/adding to the illuminants and observers for CIE color spaces? That sounds like a nice addition :)

I just skimmed the codebase, and I think it looks like a good first issue. I wonder if it is worthwhile to add to that a general implementation that allows a user to manually specify the observer and illuminant while keeping the option to have common ones pre-specified.

@BierretA
Copy link
Contributor Author

For now, I will try a simple PR to add a few illuminants/observers.
Though having the possibility to manually specify illuminant and observer, as @FirefoxMetzger said, is something I would personally find useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants