JuliaImages / DitherPunk.jl

Dithering algorithms in Julia.
MIT License
60 stars 3 forks source link

Support approximate methods for nearest neighbour color search #55

Open adrhill opened 2 years ago

adrhill commented 2 years ago

@johnnychen94 I've thought about this and feel like it would bloat the package too much to include a dependency on other packages like RegionTrees.jl. However we could define an interface à la "AbstractClosestColorSelector" to allow users to implement their own approximations. colordither could then have a colorselector kwarg that defaults to the current implementation.

johnnychen94 commented 2 years ago

I prefer to hold this issue infinitely until people request it, or until we come up with a satisfying solution. My personal experience with nearest neighbor search is that it isn't simple at all when extreme performance is required. For instance, it took me more than a year to figure out a 5-15x solution to MATLAB on WNNM denoising, where nearest neighbour search, aka, block matching, takes about 1/2 of the computation. Yet I'm not satisfied at all so it's still experimental...