Click or drag to resize
CvInvokeEMD Method
http://www.emgu.com
Computes the 'minimal work' distance between two weighted point configurations.

Namespace: Emgu.CV
Assembly: Emgu.CV.World (in Emgu.CV.World.dll) Version: 3.1.0.2282 (3.1.0.2282)
Syntax
public static float EMD(
	IInputArray signature1,
	IInputArray signature2,
	DistType distType,
	IInputArray cost = null,
	float[] lowerBound = null,
	IOutputArray flow = null
)

Parameters

signature1
Type: Emgu.CVIInputArray
First signature, a size1 x 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: Emgu.CVIInputArray
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
distType
Type: Emgu.CV.CvEnumDistType
Used metric. CV_DIST_L1, CV_DIST_L2 , and CV_DIST_C stand for one of the standard metrics. CV_DIST_USER means that a pre-calculated cost matrix cost is used.
cost (Optional)
Type: Emgu.CVIInputArray
User-defined size1 x size2 cost matrix. Also, if a cost matrix is used, lower boundary lowerBound cannot be calculated because it needs a metric function.
lowerBound (Optional)
Type: SystemSingle
Optional input/output parameter: lower boundary of a distance between the two signatures that is a distance between mass centers. The lower boundary may not be calculated if the user-defined cost matrix is used, the total weights of point configurations are not equal, or if the signatures consist of weights only (the signature matrices have a single column).
flow (Optional)
Type: Emgu.CVIOutputArray
Resultant size1 x size2 flow matrix

Return Value

Type: Single
The 'minimal work' distance between two weighted point configurations.
See Also