From 35e25b760e78984ba2e779b89bea45e7ca1c4021 Mon Sep 17 00:00:00 2001 From: Ilya Lysenkov Date: Wed, 8 Jun 2011 10:16:16 +0000 Subject: [PATCH] Added the EMD function description (ticket #696) --- modules/imgproc/doc/histograms.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/imgproc/doc/histograms.rst b/modules/imgproc/doc/histograms.rst index 1486578c9..cba0cfab7 100644 --- a/modules/imgproc/doc/histograms.rst +++ b/modules/imgproc/doc/histograms.rst @@ -225,6 +225,8 @@ EMD :param flow: The resultant :math:`\texttt{size1} \times \texttt{size2}` flow matrix: :math:`\texttt{flow}_{i,j}` is a flow from :math:`i` th point of ``signature1`` to :math:`j` th point of ``signature2`` . +The function computes the earth mover distance and/or a lower boundary of the distance between the two weighted point configurations. One of the applications described in :ref:`RubnerSept98` is multi-dimensional histogram comparison for image retrieval. EMD is a transportation problem that is solved using some modification of a simplex algorithm, thus the complexity is exponential in the worst case, though, on average it is much faster. In the case of a real metric the lower boundary can be calculated even faster (using linear-time algorithm) and it can be used to determine roughly whether the two signatures are far enough so that they cannot relate to the same object. + .. index:: equalizeHist