【发布时间】:2017-12-14 04:20:05
【问题描述】:
我想使用地球移动距离(也称为 Wasserstein 度量)来测量两个直方图之间的距离。我从图像中提取直方图。
这就是我从图像中提取直方图的方式:
[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 et F2 是什么?权重是多少?!
谢谢!
【问题讨论】:
-
这是一个关于 EMD 的数学问题,而不是编程问题。该问题并非特定于上述实现。考虑在math.stackexchange.com 询问(并在此处删除)。
标签: matlab image-processing histogram distance