I'm using the function in my application with the CV_DIST_L2, and I need to compare many vectors of characteristics. I know that they are much different because I used others functions to compare, but using the EMD is returning many zero values, I'm comparing about 1 million of images. If I need to rank 10 images by the distance it is very bad because of the zero values, it is normal? For example if I have one image and I need to compare with the others 1 million, for to find the 10 more similar, may be I can't find nor the query image because of the zeros values.