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

Check if color is a human, visible color [MacAdams Limits] #333

Open
facelessuser opened this issue Jun 29, 2023 · 4 comments
Open

Check if color is a human, visible color [MacAdams Limits] #333

facelessuser opened this issue Jun 29, 2023 · 4 comments
Labels
P: maybe Pending approval of low priority request. S: triage Issue needs triage. T: feature Feature.

Comments

@facelessuser
Copy link
Owner

I'm not quite sure how I'd like to approach this, or when, but it would be interesting to implement if possible. While neat, it is not absolutely required, but I'd like to look into. There are already premeasured limits out there, much like the Pointer gamut, but it would be cool to calculate it if we can do so in a way that doesn't take forever to calculate. this would allow more accurate results.

@facelessuser facelessuser added T: feature Feature. P: maybe Pending approval of low priority request. labels Jun 29, 2023
@gir-bot gir-bot added the S: triage Issue needs triage. label Jun 29, 2023
@facelessuser facelessuser changed the title Check if color is a human, visible color MacAdams Limits Check if color is a human, visible color [MacAdams Limits] Jun 29, 2023
@eeeps
Copy link

eeeps commented Jan 3, 2024

https://www.researchgate.net/publication/44673524_Fast_and_accurate_model_for_optimal_color_computation

In case it's helpful, there's a MATLAB algorithm in this article that I've seen referenced a few places. "The computation takes around 10s for each locus using MATLAB 2010a with Windows XP x64/2.8 GHz Intel Core 2 Duo/2 GB RAM." So maybe a second or two on modern hardware. No idea if there's a smart way to less work by either:

  • only computing the sliver of the locus that shares a hue angle with the color in question
  • using some set of fixed illuminants, rather than arbitrary illuminants

@facelessuser
Copy link
Owner Author

I did look at that paper before. I saw this as well: https://www.researchgate.net/publication/39435417_A_new_algorithm_for_calculating_the_MacAdam_limits_for_any_luminance_factor_hue_angle_and_illuminant.

I just haven't taken the time to dig deeper than a quick glance at the papers.

@eeeps
Copy link

eeeps commented Jun 17, 2024

So I think you might be able use the same technique you used to implement Pointer's Gamut checking, but with MacAdam's data from this 1935 paper (Here are some relevant screenshots: 1, 2, 3). R here = "visual efficiency", this technique will only work if that = luminance (Y). I am not sure about that assumption.

@facelessuser
Copy link
Owner Author

Yes, a LUT would obviously work. Of course a tradeoff of how big a LUT to keep in memory vs accuracy would have to be considered. I'd hate to include a high precision LUT table as it would be large and eat up a bunch of memory. The Pointer gamut approach uses a very small table because that is the only data available and it is small enough to not be a big deal. I'd like to get around to dynamically calculating whether a point is in or outside of gamut, but obviously a LUT is a solution that would indeed work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P: maybe Pending approval of low priority request. S: triage Issue needs triage. T: feature Feature.
Projects
None yet
Development

No branches or pull requests

3 participants