Algorithm to match timestamped events from two sources

Posted by urza.cc on Programmers See other posts from Programmers or by urza.cc
Published on 2014-05-29T23:34:45Z Indexed on 2014/05/30 3:50 UTC
Read the original article Hit count: 252

Filed under:

I have two different physical devices (one is camera, one is other device) that observe the same scene and mark when a specified event occures. (record timestamp)

So they each produce a serie of timestamps "when the event was observed". Theoretically the recorded timestamps should be very well aligned:

Visualized ideal situation on two time lines "s" and "r" as recorded from the two devices:

Visualized timestamps of events in ideal conditions

but more likely they will not be so nicely aligned and there might be missing events from timeline s or r:

Visualized timestamps of events in real world conditions

I am looking for algorithm to match events from "s" and "r" like this:

Matched events

So that the result will be something like: (s1,null); (s2,r1); (s3,null); (s4,r2); (s5,r3); (null,r4); (s6,r5); Or something similar. Maybe with some "confidence" rating.

I have some ideas, but I feel that this might be probably a well known problem, that has some good known solutions, but I don't know the right terminology. I am a little bit out of my element here, this is not my primary area of programming.. Any helps, suggestions etc will be appreciated.

© Programmers or respective owner

Related posts about algorithms