1 | initial version |

So, this is a bit out of the box, but have you tried a particle filter tracking algorithm?

What you have there is essentially a bunch of really noisy measurements of a target. Each column is one measurement. You have a probability of missing the true target, and a probability of detecting a false target, which you can probably make good guesses at from the data.

What you would be tracking is the vertical location in the data, with the horizontal being "time".

I don't have any links handy, but a search for particle filtering should turn up some tutorials. This problem is pretty simple, with one "target", so that's nice.

Of course, this assumes that the line is as you have it shown, going from one side to another, no doubling back. It gets a little harder if your problem is like that, but not impossible.

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.