Home > Blockchain >  Best way to extract multiple trajectories from uncorelated position data?
Best way to extract multiple trajectories from uncorelated position data?

Time:06-20

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? You can see the index of each particle for each frame 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.

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 ?)

anyway, I would be happy to get any input!

Cheers,

Kamel

CodePudding user response:

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?

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). K-means is not suitable here, my first pick would be something like DBScan algo.

CodePudding user response:

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.

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.

  • Related