0
我想要使用Earth Mover距离(也称为Wasserstein度量)度量两个直方图之间的距离。我从图像中提取直方图。2个直方图之间的Earth Mover距离/ Wasserstein度量(MATLAB)
这是我如何提取我的图像直方图:
[N1,X1]=hist(image1,128)
[N2,X2]=hist(image2,128)
128表示类的直方图的数量。
function [x, fval] = emd(F1, F2, W1, W2, Func)
% EMD Earth Mover's Distance between two signatures
% [X, FVAL] = EMD(F1, F2, W1, W2, FUNC) is the Earth Mover's Distance
% between two signatures S1 = {F1, W1} and S2 = {F2, W2}.
% F1 and F2 consists of feature vectors which describe S1 and S2, respectively.
% Weights of these features are stored in W1 and W2.
% FUNC is a function which computes the ground distance between two feature vectors.
但我真的不知道怎样才能申请,在我的情况。事实上,在我的情况下F1和F2是什么?什么是重量?
谢谢!
这是关于EMD不仅仅是一种编程一个相当的数学问题。这个问题不是特定于所提到的实施。考虑在https://math.stackexchange.com/上提问(并在此处将其删除)。 – m7913d