Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"To speed up the color difference calculations we decided to vectorised deltaE. The standard deltaE functions are already implemented in the colormath python package. We ported these to numpy and added a function to take a numpy array of Lab coordinates. When used with large data-sets the vectorised implementation is 25-180 times faster depending on which distance function is used. The vectorised delta E functions are now available in the colormath package and can be used in the following manner."

Uhm.. wouldn't it have been easier to just run a voronoi algorithm on the data set in the labspace? then you have a lookup table/cube. For a paltry 6mb of space, lookup becomes instantaneous. It's what voronoi is for.



Even better would be to take the full data set of all the survey responses, and use it to generate the partition of CIELAB space, instead of just using the single set of coordinates per name that Randall generated from those. But it would be more work.

Edit: do note they’re using a more complicated distance definition such that a straight Voronoi diagram in CIELAB space is not quite the same as their result. But the difference is so slight as to not matter, so your suggested solution would be substantially better than theirs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: