简体   繁体   English

从不相关的位置数据中提取多个轨迹的最佳方法?

[英]Best way to extract multiple trajectories from uncorelated position data?

TLDR; TLDR; I have some position data of multiple particles in time and I want to extract the trajectories of each particle!我有一些及时的多个粒子的位置数据,我想提取每个粒子的轨迹!

So, I'm doing some image detection of multiple particles in a fluidized bed (basically a bunch of spheres in a square box that we put liquid through so that the particles start moving like a "fluid" aka a fluidized bed of spherical particles).所以,我正在对流化床中的多个粒子进行一些图像检测(基本上是在一个方形盒子中的一堆球体,我们将液体通过,这样粒子开始像“流体”一样移动,也就是球形粒子的流化床) .

The idea being that we put some colored particles in with a bunch of transparent particles, so we can track the trajectory of the tagged particles in motion (the goal is to get the velocities, acceleration, collision rates ...).这个想法是我们将一些有色粒子与一堆透明粒子一起放入,这样我们就可以跟踪运动中标记粒子的轨迹(目标是获得速度、加速度、碰撞率......)。 Image example of a tagged particle标记粒子的图像示例

The data we get from the image processing here is the processed position data of a test, as you can see, we detect for each frame the particles (and as you can see, there can be multiple particles detected in the same frame)我们这里从图像处理中得到的数据是一个测试的处理后的位置数据,如您所见,我们为每一帧检测粒子(如您所见,同一帧中可以检测到多个粒子)

the plotted data is shown in the next figure.绘制的数据如下图所示。 Mind that we use a single camera to capture the 3 Position components (by using a mirror angled at 45 deg for those who are curious) Plotted "intermediate" position data (we already did clean the data a bit) We can clearly distinguish trajectories, but we also can see that there is still a lot of "noise", and the main problem is that the data is organized in a way that for each frame we detect the particles and store their positions, and redo the same for the next frame, and the problem is that we are not sure if Particles1 for frame X is the same Particle1 that moved in the Frame X+1?请注意,我们使用单个相机来捕获 3 Position 组件(对于那些好奇的人,使用 45 度角的镜子)绘制“中间”位置数据(我们已经对数据进行了一些清理)我们可以清楚地区分轨迹,但我们也可以看到仍然存在很多“噪音”,主要问题是数据的组织方式是,对于每一帧我们检测粒子并存储它们的位置,并为下一帧重做同样的事情, 问题是我们不确定 X 帧的 Particles1 是否与 X+1 帧中移动的 Particle1 相同? You can see the index of each particle for each frame Particles index可以看到每帧每个粒子的索引 Particles index

My question is;我的问题是; given the plotted data, what is the best way to extract the trajectory of each particle, keeping in mind that I ultimately need the velocities (so I need the temporal component as well)?给定绘制的数据,提取每个粒子轨迹的最佳方法是什么,记住我最终需要速度(所以我也需要时间分量)?

I thought about using something similar to the [k-nearest neighbors algorithm][5], but it only classifies them spatially.我考虑过使用类似于 [k-nearest neighbors algorithm][5] 的东西,但它只对它们进行空间分类。

Another way I see to solve this is to brute force it and calculate the minimal distance pairs and chain these pairs to form trajectories?我看到解决这个问题的另一种方法是蛮力它并计算最小距离对并将这些对链接以形成轨迹? But this looks dumb to me, so maybe there is a clever algorithm to do this (traveling salesman problem like algorithm xD ?)但这对我来说看起来很愚蠢,所以也许有一个聪明的算法可以做到这一点(像算法 xD 这样的旅行推销员问题?)

anyway, I would be happy to get any input!无论如何,我很乐意得到任何意见!

Cheers,干杯,

Kamel卡梅尔

I do not understand how precisely You get the measurements.我不明白你得到的测量结果有多精确。 I understand that You have a set of points in 4-D space (frame ~ time, area, X, Y) (whatever area is) and I think You need to split these points into sets, where the set corresponds to "a trajectory of one particle", right?我知道您在 4-D 空间中有一组点(frame ~ time, area, X, Y) (无论区域是什么),我认为您需要将这些点分成集合,其中集合对应于“轨迹一个粒子”,对吧?

If so, it seems to me that what You are looking for is some sort of clustering in this 4-D space (or maybe 3-D if the area does not make sense).如果是这样,在我看来,您正在寻找的是在这个 4-D 空间中的某种聚类(或者如果该area没有意义,则可能是 3-D)。 K-means is not suitable here, my first pick would be something like DBScan algo . K-means不适合这里,我的第一个选择是DBScan algo之类的。

The general strategy is to predict the positions of the particles from one frame to the next, and match the particles in the new frame to the predicted ones.一般策略是从一帧到下一帧预测粒子的位置,并将新帧中的粒子与预测的粒子匹配。

The 0th order prediction is to assume that the particles do not move, so you just use the position in the previous frame and nearest neighbor search. 0 阶预测是假设粒子不移动,所以你只需使用前一帧中的位置和最近邻搜索。

The 1st order prediction would assume that the particles move in a linear motion at constant speed.一阶预测假设粒子以恒定速度进行线性运动。 You can estimate the speed from the last two frames (assuming that you could match them between these frames), and extrapolate to the new one.您可以估计最后两帧的速度(假设您可以在这些帧之间匹配它们),并推断到新的一帧。

A 2nd order prediction would be with accelerations, and so on.二阶预测将是加速度,依此类推。

You will face several difficulties, among which您将面临几个困难,其中

  • obtain and maintain correct values of the speeds (it can be beneficial to estimate the speed from several previous frames),获得并保持正确的速度值(从前几帧估计速度可能是有益的),

  • deal with particles that are not detected in all frames (keep estimating their positions and reject "dubious" matchings),处理未在所有帧中检测到的粒子(继续估计它们的位置并拒绝“可疑”匹配),

  • ambiguous matchings when two particles cross each other.两个粒子相互交叉时的模棱两可的匹配。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM