I am looking for an Earth Mover’s distance(or Fast EMD) implementation in python.
Any clues on where to find it, I have looked enough on the web.
I want to use it in an image retrieval project that I am doing.
Thanks.
EDIT:
I found a very nice solution using the pulp libararies.
This page also has the instruction required to set it up.
There is an excellent implementation in OpenCv for Python. The name of the function is CalcEMD2 and a simple code to compare histograms of two images would look like this:
I tested a code very similar to the previous code with Python 2.7 and Python(x,y). If you want to learn more about Earth Mover’s and you want to see an implementation using OpenCV and C++, you can read “Chapter 7: Histograms an Matching” of the book “Learning OpenCV” by Gary Bradski & Adrain Kaebler.