You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- ``first_signature``: A 1-dimensional numpy array of ``np.float``, of size N.
76
-
- ``second_signature``: A 1-dimensional numpy array of ``np.float``, of size N.
77
-
- ``distance_matrix``: A 2-dimensional array of ``np.float``, of size NxN. Must
78
-
be symmetric and represent a metric.
71
+
The arguments to ``emd_with_flow`` are the same.
79
72
80
73
81
74
Limitations and Caveats
82
75
~~~~~~~~~~~~~~~~~~~~~~~
83
76
84
-
- ``distance_matrix`` must be symmetric.
85
-
- ``distance_matrix`` is assumed to represent a true metric. This must be
86
-
enforced by the user. See the documentation in ``pyemd/lib/emd_hat.hpp``.
77
+
- ``distance_matrix`` is assumed to represent a metric; there is no check to
78
+
ensure that this is true. See the documentation in ``pyemd/lib/emd_hat.hpp``
79
+
for more information.
87
80
- The flow matrix does not contain the flows to/from the extra mass bin.
88
-
- The signatures and distance matrix must be numpy arrays of ``np.float``. The
89
-
original C++ template function can accept any numerical C++ type, but this
90
-
wrapper only instantiates the template with ``double`` (Cython converts
91
-
``np.float`` to ``double``). If there's demand, I can add support for other
92
-
types.
81
+
- The histograms and distance matrix must be numpy arrays of type
82
+
``np.float64``. The original C++ template function can accept any numerical
83
+
C++ type, but this wrapper only instantiates the template with ``double``
84
+
(Cython converts ``np.float64`` to ``double``). If there's demand, I can add
85
+
support for other types.
86
+
93
87
94
88
Contributing
95
89
~~~~~~~~~~~~
96
90
97
-
To help develop PyEMD, fork the project on GitHub and install the requirements with ``pip``.
91
+
To help develop PyEMD, fork the project on GitHub and install the requirements
92
+
with ``pip``.
98
93
99
94
The ``Makefile`` defines some tasks to help with development:
100
95
@@ -104,6 +99,8 @@ The ``Makefile`` defines some tasks to help with development:
104
99
* ``clean``: remove the build directory and the compiled C++ extension
105
100
* ``test``: run unit tests with ``py.test``
106
101
102
+
Tests for different Python environments can be run by installing ``tox`` with
103
+
``pip install tox`` and running the ``tox`` command.
107
104
108
105
Credit
109
106
~~~~~~
@@ -118,7 +115,9 @@ Credit
118
115
Please cite these papers if you use this code:
119
116
``````````````````````````````````````````````
120
117
121
-
Ofir Pele and Michael Werman, "A linear time histogram metric for improved SIFT matching," in *Computer Vision - ECCV 2008*, Marseille, France, 2008, pp. 495-508.
118
+
Ofir Pele and Michael Werman, "A linear time histogram metric for improved SIFT
119
+
matching," in *Computer Vision - ECCV 2008*, Marseille, France, 2008, pp.
120
+
495-508.
122
121
123
122
.. code-block:: latex
124
123
@@ -132,7 +131,9 @@ Ofir Pele and Michael Werman, "A linear time histogram metric for improved SIFT
132
131
publisher={Springer}
133
132
}
134
133
135
-
Ofir Pele and Michael Werman, "Fast and robust earth mover's distances," in *Proc. 2009 IEEE 12th Int. Conf. on Computer Vision*, Kyoto, Japan, 2009, pp. 460-467.
134
+
Ofir Pele and Michael Werman, "Fast and robust earth mover's distances," in
135
+
*Proc. 2009 IEEE 12th Int. Conf. on Computer Vision*, Kyoto, Japan, 2009, pp.
0 commit comments