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

Daltonization incorrect for Deuteranopia and Tritanopia? #12

Open
dektar opened this issue Mar 1, 2023 · 2 comments
Open

Daltonization incorrect for Deuteranopia and Tritanopia? #12

dektar opened this issue Mar 1, 2023 · 2 comments

Comments

@dektar
Copy link

dektar commented Mar 1, 2023

It looks like the Daltonization code in https://github.com/DaltonLens/DaltonLens/blob/master/Dalton/Filters.cpp#L275 is always using the Protanopia matrix to add the error back into the image. I think it should be changing the matrix for Deuteranopia to shift away from the green channel and for Tritanopia to shift away from the blue channel.

See for example the matrixes in https://source.chromium.org/chromium/chromium/src/+/main:ui/accessibility/extensions/colorenhancer/src/cvd.js;l=106?q=cvd.js showing matrixes for correcting in red, green and blue.

@nburrus
Copy link
Contributor

nburrus commented Mar 1, 2023

indeed! Actually I see I had some comments about that in the OpenGL version of the filter

// FIXME: here all the errors is distributed from the red channel to the
. Feel free to submit a PR or I'll fix it when I get a chance, thanks for the report!

@dektar
Copy link
Author

dektar commented Mar 3, 2023

I'll do it if I find time, meanwhile I'm doing the similar thing here so it was helpful to confirm that the error correction matrix should differ for each CVD type!

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

No branches or pull requests

2 participants