问题描述
我正在尝试给定一组不同长度的相似路径的平均路径.路径数据仅是空间数据,没有时间归属于每个点.
I'm trying to obtain an average path given a group of similar paths of different lengths. Path data is only spatial, with no time attributed to each point.
简单地说,是否有一种算法可以在给定蓝色路径的情况下找到红色路径?
To put it simply, is there an algorithm that can find the red path given the blue paths?
蓝色之路
红色路径
推荐答案
在以下问题中有一个解决方案:来自Neil Vaughan& Co.,Ltd.的使用动态时间规整比较和组合时间序列轨迹".博格丹·加布里斯(Bogdan Gabrys).
There is a solution to this problem in: "Comparing and combining time series trajectories using Dynamic Time Warping" from Neil Vaughan & Bogdan Gabrys.
它使用动态时间规整(DTW)算法,该算法告诉轨迹A上的点如何以最小的扭曲"映射到轨迹B上的点.然后,通过平均DTW已配对"的A和B中的点,可以计算出轨迹A + B的平均值.如果您有两个以上的轨迹,请迭代进行:首先,将A与B合并,然后将C与结果合并,依此类推.
It uses a Dynamic Time Warping (DTW) algorithm which tells how the points on trajectory A can be mapped to the points on trajectory B with the least "warping". You then compute an average of trajectory A+B by averaging the points in A and B that DTW has "paired". If you have more than two trajectories, proceed iteratively: first, merge A with B, then merge C with the result, and so on.
R(库 dtw
)中的DTW有很好的实现方式
There's a good implementation of DTW in R (library dtw
)
这篇关于从一组轨迹中获取平均轨迹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!