Okay so I have an array of objects. Each object has a vector of x and y co-ordinates in pixels.
I need to effectively go through and compare them to each other and say they're the same one. (They're spread across several time-frames, so there is a variance of length and there could be a couple of pixels difference at each point)
What I've done so far that works okay is effectively draw up a box around the current loop and then compare the future-time-frames. Get the objects with that relative position. (With some excess at the sides to account for movement)
I then calculate the Euclidean distance between the two objects. This works okay for some but misses frames and includes occasional bogus results.
To attempt to counter-act this I calculate the cross-correlation of the co-ordinates and then use this as a offset on the longer array when calculating the euclidean.
However this doesn't appear to work as well as I'd hoped and through research I understand that Euclidean may not be the best way.
Ideally i want a similarity rating between the two and be able to say 'yes this is the same object at a later time'
What do people suggest?