2013-03-31 11:18:15 -0600 | commented answer | Python : Giving a custom cost matrix in CalcEMD2? From http://docs.opencv.org/modules/imgproc/doc/histograms.html : From that docpage, it appears that CV_DIST_USER is the metric to use when supplying a cost matrix, as far as I can understand. Also, the complaint seems so be that it wants either a function or a matrix but that it got both. |
2013-03-31 09:27:07 -0600 | asked a question | Python : Giving a custom cost matrix in CalcEMD2? I am trying to create a custom cost matrix (cyclic array indices) for earth mover's distance calculation between regular / numpy arrays : However, I am getting the error: While my code may not be perfect, I am clearly not giving a distance function to the method call. Is this a bug in the python wrapper or my mistake? I am using OpenCV 2.4.2 I believe (the one that is linked to in python(x,y) ). Any help will be much appreciated. |