|
CEDRIC
Revision_backup-2009-02
|
C++ Template Wrapper for original Ansi C code from Yossi Rubner. More...
#include <EarthMoversDistance.h>
Public Member Functions | |
| EarthMoversDistance (const T &signature1, const T &signature2, const GroundDistance< F > &dist) | |
| Compute EMD between two signatures according to given GroundDistance. More... | |
| float | value () const |
| Returns value of optimal solution. More... | |
C++ Template Wrapper for original Ansi C code from Yossi Rubner.
These is a slightly adjusted version of code from Yossi Rubner, where the main routines are unchanged, i also left the original comments. So please note the original comment from EMD.h:
emd.h Last update: 3/24/98 An implementation of the Earth Movers Distance. Based of the solution for the Transportation problem as described in "Introduction to Mathematical Programming" by F. S. Hillier and G. J. Lieberman, McGraw-Hill, 1990. Copyright (C) 1998 Yossi Rubner Computer Science Department, Stanford University E-Mail: rubner@cs.stanford.edu URL: http://vision.stanford.edu/~rubner
Signature type class T must supply following members
where feature type class F can be arbitrary. I didn't use a abstract base class as interface for T out of performance considerations.
Make getter not only for optimal solution value but also for optimal flow assignment
Get rid of second template parameter, it's redundant in current implementation
Throw proper exceptions instead of just error-strings
| EarthMoversDistance< T, F >::EarthMoversDistance | ( | const T & | signature1, |
| const T & | signature2, | ||
| const GroundDistance< F > & | dist | ||
| ) |
Compute EMD between two signatures according to given GroundDistance.
|
inline |
Returns value of optimal solution.
Referenced by EventNavigator::computeClustering(), EventMap::create(), and EventNavigator::immerse().
1.8.6