ANP-Granular / ParticleTracking

Library and GUI for tracking (rod-like) particles on camera images in 2D and 3D
https://particletracking.readthedocs.io/en/latest/
GNU General Public License v3.0
2 stars 2 forks source link

Tracking gives unexpected results #96

Open merrygoat opened 1 month ago

merrygoat commented 1 month ago

The documentation says:

The tracking mode on the other hand attempts to find an optimal assignment of particle numbers between camera angles within one frame

When trying to reconstruct 3d positions, I can see that with tracking turned on, I get much better results as shown in the 3d view window. However, the particle numbers do not seem to update either in the main view window or in the output data. How can I access/retrieve the updated particle numbers?


To reproduce

displacement rods_df_black.csv rods_df_black_corrected.csv

merrygoat commented 1 month ago

Sorry - wrong github issue label - it should probably be a bug rather than an enhancement.

dmitrypuzyrev commented 1 month ago

Thank you for pointing this out! It might be that tracking was tested on another images/data sets and here it is inconsistent for some reason. We will check and fix it it as soon as possible (latest in the first days of the next week).

dmitrypuzyrev commented 4 weeks ago

Hi @merrygoat, I think we are close to undestanding/solving this issue. The tracking/reconstruction seems to work sufficiently fine even in case of large particle numbers as in example dataset, as soon as all particles are marked in 2D close to their real positions (this is the nature of the current 3D tracking algorithm).

But I encounter a problem with saving/updating the new position data after the initial press of the solve button. As soon as I correct the position and try to solve again, the particles revert to their last "solved" coordinates. This seems to be consistent with your issue. I think this should be resolved by @a-niem soon.

dmitrypuzyrev commented 2 weeks ago

Dear @merrygoat, sorry for the delay. We had to focus on other issues which prevented fixing this one. I will update you in the next working days.

dmitrypuzyrev commented 1 week ago

Hi @merrygoat, I have fixed the issue with tracking. It seems that example data is good enough to produce meaningful results, and the issue was caused by an error in the algorithm implementation. Please check it out on develop branch. In case of your attached corrected endpoints data (), solve should produce a smooth average displacement around 2.5 mm between all frames, with occasional jumps between some rods pairs which are hard to resolve in 3D (but it's absolutely normal for this task). I also attach my attempt of endpoint correction with a slightly smaller average displacement. The data saving issue was also resolved earlier by @a-niem.