973 karma · joined April 5, 2017
Also, everything is on my computer at work but I can share everything when I go back on Monday (in 31 hours), the code, the DB, some sample images it made.
Because I work in a textile mill we make colors by printing images on paper with a CMYK process and then we use heat to sublimate the ink off of the paper onto the textile. In this process there are so many variables affecting the color of the ink that it's basically a black box where CMYK numbers go in and very often the wrong color comes out. The only way to match colors is to pick a lot of them, and see which one is the most accurate after transfer and use that one. The process of picking those colors is what I'm working on.
I think a row in the DB is 7 floats, it should be 4 ints (c,m,y,k) and 3 floats (lightness, chroma, hue) but I don't know how to fix 10^8 rows in a reasonable amount of time.
The reason it takes so long is because first it searches for the source CMYK color. Then because of how floats work I can't just tell it to pick all the colors with the same hue, I have to specify some delta and pick all the colors where the absolute value of the hue minus the hue of the source color is less than the delta. That's the part that takes a lot of time but I can't really think of a way to speed it up beside changing the data types of the columns.
Now because I work in a textile mill, the tolerance I usually get is 0.125 inches which is huge. I usually go all the way down to 0.0001 inches because I think it's funny, and also I do have aspirations beyond just working with textiles.
I think that would be a lot better.
Nowadays when I'm posting in the clear with my real name I usually stop and think "Would someone hire me if they read this?" and then delete everything I wrote and just move on with my life.
https://www.amazon.com/Mathematical-Methods-Artificial-Intel...
I found my copy at Goodwill.