I need to calculate the Earth Mover's Distance (EMD) in my program. I am trying to follow this answer, but for some reason the cv2
module which I have on my system does not have the function CalcEMD2
. Could someone explain why it is missing?
I am using Anaconda for Python 3.4 and installed OpenCV with
conda install -c https://conda.anaconda.org/menpo opencv3
The package installed without problems and imports nicely.
>>> import cv2
>>> print(cv2.__version__)
3.1.0
However, CalcEMD2
does not exist. The namespace of cv2
has only two members containing the string 'emd' (case-insensitive), neither of which is the function I'm looking for:
>>> [k for k in cv2.__dict__ if 'emd' in k.lower()]
['createEMDHistogramCostExtractor', 'createEMDL1HistogramCostExtractor']