https://github.com/cvzoya/saliency/blob/5951cdc7c2ba73e5951d4c36bea58e8c7d41e55d/code_forMetrics/EMD.m#L19