Question

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?

Was it helpful?

Solution

It sounds like you are trying to determine whether multiple collections of time/space coordinates (a.k.a "tracks") are likely to correspond to the same object. This is known in some circles as "object tracking", for which there is a fair amount of literature (e.g., Object Tracking: A Survey - CRCV - University of Central Florida). This document points to other literature, which may explain various algorithms for predicting future locations of the objects.

I think what you want to do is to extrapolate the known points in time/space such that you can compare points at given times. (Euclidean distance may be fine.) In your distance function, you probably want to weight the comparison of "predicted" locations less than you would for your comparison of actual (captured) locations.

I hope I didn't misinterpret your intent.

OTHER TIPS

I think you should organize your data as a k-d tree.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top