Computer vision and embroidery
healeycodes.com
healeycodes.com
I've received two emails from readers:
- One suggested converting RGB to a color space that better matches human visual perception, like CIELAB.
- Another suggested compressing the color space by using K-means clustering (by guessing K as the number of threads)
I’ll see if I can make that clearer — thanks.
Also: it seems like your query function is actually building the tree on each call? If so, that would slow it down a lot (though the lru cache is still a great idea!)
I'd start by shooting against a white background with full spectrum lighting. Then you can compensate for the camera processing to get roughly calibrated brightness.