JuliaImages / ImageDistances.jl

Distances between N-dimensional images
https://github.com/JuliaImages/Images.jl
Other
15 stars 8 forks source link

WIP: Add earth mover's distance #4

Closed timholy closed 6 years ago

timholy commented 6 years ago

This depends on the unregistered https://github.com/mirkobunse/EarthMoversDistance.jl. Issues include dependence on a C library. Thoughts?

timholy commented 6 years ago

See some discussion at https://github.com/robertfeldt/EarthMoversDistance.jl/pull/1

juliohm commented 6 years ago

Thank you @timholy I fully agree with the discussion you've linked. It would be nice to have a Julia implementation of EMD algorithms. I am also busy at the moment to try understand it in depth.

Do you think it is a good idea to have it here as a dependency though? My opinion is that we could make use of the unregistered package, or maybe register it for standalone usage until someone finds time to implement it in Julia.

timholy commented 6 years ago

See https://github.com/JuliaLang/Pkg.jl/issues/810

juliohm commented 6 years ago

Interesting issue, thanks for sharing. My comment was more about maybe leaving EarthMoversDistance.jl the way it is as a separate package with a C dependency until someone finds the time to implement a pure Julia version?

Another issue is that the Earth movers distance has an original definition with probability distributions. Maybe one could define the distance in a package where non-parametric (histogram) distribution types are available. Perhaps Distances.jl or Distributions.jl would be more appropriate places for this algorithm? Hard to say. In any case, we could import a package like Distances.jl or Distributions.jl into ImageDistances.jl and wrap the algorithm to work with images.

timholy commented 6 years ago

There really isn't anything terribly image-specific here, if the main algorithm lives elsewhere that's pretty much it. Shall I close?

juliohm commented 6 years ago

The C dependency is a major downside, let's close it for now. We can get back to it in the future with more time to make it Julian. Thanks for raising the issue and for the reference implementation.