okiyama / pixel-matcher

Multi file image differ, with the intent of producing art rather than being technically useful
MIT License
14 stars 0 forks source link

Try CIELAB for color space #2

Open okiyama opened 4 years ago

okiyama commented 4 years ago

"You're basically just running kmeans on the pixels, right? If that's correct, I'd strongly recommend you use a "perceptually uniform" color space and distance metric, like CIELAB. Even HSV would be better than RGB. The issue with just using RGB is that perceived color proximity doesn't correlate well to euclidean distance in RGB space. Two colors can be "numerically close" in RGB without being perceptually similar." https://www.reddit.com/r/Python/comments/dmzs6s/i_created_a_python_script_to_generate_color/f570vcv/?context=3

okiyama commented 4 years ago

https://en.m.wikipedia.org/wiki/Color_difference I wonder if there's a library for this, problem would be getting it on the GPU.