Has anyone implemented in Mathematica the Earth Mover's Distance (EMD)? A concept dating back to Monge 1871, used to compare histograms and images, e.g., the CIEDE2000 Color Difference algorithm. Yossi Rubner's C implementation can be found here:

Computation of EMD is more involved than Euclidean metric. EMD is a linear constrained optimization problem, and so can be handled presumably via Mathematica's Linear Programming functionality. Although there's typically additional normalization stage, e.g.. found here.

  • $\begingroup$ Couldn't you just link to the compiled code you refer to? $\endgroup$ Apr 4 '12 at 21:15
  • 1
    $\begingroup$ A related demonstration at Monge-Kantorovich Problem $\endgroup$
    – kglr
    Apr 4 '12 at 21:58
  • $\begingroup$ @SCdeV, 2many papers 2read. There's the Wavelet dual EMD approximation, there's Quadratic Chi metrics, there's a whole book called Dictionary of Distances. And then there's the ultrametric paradise, in sparse data regimes where all triangles are isoceles w/ small base. $\endgroup$ Apr 5 '12 at 18:14
  • $\begingroup$ If you mangle my name the @-calling mechanism won't notify me. I just happened to chance by now. My remark was not about reading stuff but about linking to the C code. $\endgroup$ Apr 7 '12 at 6:28
  • 1
    $\begingroup$ I meant linking Mathematica (not this question) to the C code. There are several mechanisms to do this. $\endgroup$ Apr 11 '12 at 5:47

In Mathematica 9, it is already implemented under ImageDistance.

See Similarity Graph of Images Using Earth Mover Distance.

  • $\begingroup$ Well this would be one easy bounty... $\endgroup$
    – shrx
    Nov 30 '13 at 12:27
  • $\begingroup$ Isn't this only for 2D and 3D cases? $\endgroup$
    – Sterling
    Feb 17 '21 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.