CvCalcEMD2 Method (CvArr, CvArr, DistanceType, CvDistanceFunction, CvArr, CvArr) OpenCvSharp Class Library
Computes "minimal work" distance between two weighted point configurations.

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public static float CalcEMD2(
	CvArr signature1,
	CvArr signature2,
	DistanceType distanceType,
	CvDistanceFunction distanceFunc,
	CvArr costMatrix,
	CvArr flow
)

Parameters

signature1
Type: OpenCvSharpCvArr
First signature, size1×dims+1 floating-point matrix. Each row stores the point weight followed by the point coordinates. The matrix is allowed to have a single column (weights only) if the user-defined cost matrix is used.
signature2
Type: OpenCvSharpCvArr
Second signature of the same format as signature1, though the number of rows may be different. The total weights may be different, in this case an extra "dummy" point is added to either signature1 or signature2.
distanceType
Type: OpenCvSharpDistanceType
Metrics used
distanceFunc
Type: OpenCvSharpCvDistanceFunction
The user-defined distance function. It takes coordinates of two points and returns the distance between the points.
costMatrix
Type: OpenCvSharpCvArr
The user-defined size1×size2 cost matrix. At least one of cost_matrix and distance_func must be NULL. Also, if a cost matrix is used, lower boundary (see below) can not be calculated, because it needs a metric function.
flow
Type: OpenCvSharpCvArr
The resultant size1×size2 flow matrix: flowij is a flow from i-th point of signature1 to j-th point of signature2

Return Value

Type: Single

[Missing <returns> documentation for "M:OpenCvSharp.Cv.CalcEMD2(OpenCvSharp.CvArr,OpenCvSharp.CvArr,OpenCvSharp.DistanceType,OpenCvSharp.CvDistanceFunction,OpenCvSharp.CvArr,OpenCvSharp.CvArr)"]

See Also

Reference