I am searching for an example Python implementation to compute the Earth Mover's Distance (EMD) between two histograms (in order to compare the similarity of two images). The answer given in this post Python code for Earth mover's Distance is exactly what I am looking for, but I need it to work with cv2. The new installation of the OpenCV library no longer includes support for cv (the old library). The code in this tutorial http://compvis.readthedocs.org/en/latest/histograms.html#earth-mover-s-distance-emd is also correct, but once again uses the old library.
Any help you could provide would be much appreciated. Thanks!