http://www.emgu.com
Computes the 'minimal work' distance between two weighted point configurations.
Namespace: Emgu.CVAssembly: Emgu.CV.World (in Emgu.CV.World.dll) Version: 3.2.0.2682 (3.2.0.2682)
Syntax public static float EMD(
IInputArray signature1,
IInputArray signature2,
DistType distType,
IInputArray cost = null,
float[] lowerBound = null,
IOutputArray flow = null
)
Public Shared Function EMD (
signature1 As IInputArray,
signature2 As IInputArray,
distType As DistType,
Optional cost As IInputArray = Nothing,
Optional lowerBound As Single() = Nothing,
Optional flow As IOutputArray = Nothing
) As Single
public:
static float EMD(
IInputArray^ signature1,
IInputArray^ signature2,
DistType distType,
IInputArray^ cost = nullptr,
array<float>^ lowerBound = nullptr,
IOutputArray^ flow = nullptr
)
static member EMD :
signature1 : IInputArray *
signature2 : IInputArray *
distType : DistType *
?cost : IInputArray *
?lowerBound : float32[] *
?flow : IOutputArray
(* Defaults:
let _cost = defaultArg cost null
let _lowerBound = defaultArg lowerBound null
let _flow = defaultArg flow null
*)
-> float32
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:
SingleThe 'minimal work' distance between two weighted point configurations.
See Also