Tracking of identical objects with Contour

Hello,

(I’m sure I’m not the first one to have this problem, sorry if you already answer this question many times but I didn’t find a solution in the forum or the documentation.)

I have several identical objects (so undistinguishable) moving, and I send the image (coming from a camera or from a simulation) to the Contour node.
It works fine, I have my objects detected, but when two objects come too close (or superimpose, since it’s a 2d vision), one disappears, then reappears when the 2 move away. But in this case it has a different ID number. So the initial identification of the objects is impossible to preserve in the time.

I tried to patch a solution, but after days and days it still does not work.

What i do : when an object disappears, I store its latest position and its ID, and also the position and the ID of its close neighbour which causes its disappearance. Then, when it reappears (near the neighbour), I give it its stored data. Etc. Tried this sort of things…
Works fine with theory (with spreads I manually alternate), but not in “reality”. I suspect there are some kind of oscillations (appearance/disappearance very quickly), so it kills my patch (which uses loops with framedelays).

Is there a known trick ? What advices could you have for me ?

I saw this yesterday’s thread :Vvvv and augmented reality
where Joreg says :

I guess this is my case…

Do you think such problem is more easy to solve in coding a FreeFrame node, starting from the Contour one for example (I think I could do it, knowing C++), or in patching like I tried to do ?

Thank you for any help,

Matthieu

helo matthieu,

with markerless tracking i meant tracking without markers like fiducials or ARToolkit markers involved. there are systems that can be trained with any kind of image and whenever they detect it give you its associated ID and even the location of it in 3D. this is not related to your problem.

i understand your problem but i don’t have a solution. contour definitely can’t do it. i’d say you’d need to make assumptions taking into account the movement history of objects in a way that if objects join and re-separate in different directions you maybe able to guess their former IDs by comparing their directional vectors over time?! the OpenCV community should be the one to be asked for help. maybe they have some ready to use code for that problem.

Ah OK, I misunderstood for markless tracking.

For Contour, I will continue to search a solution.
Indeed I thought about directional vectors, but was afraid it would be complicated. I will try.
And maybe I will take a look at OpenCv community.

Thank you very much Joreg.