calculate turning points / pivot points in trajectory (path)

前端 未结 5 1326
花落未央
花落未央 2020-12-23 01:41

I\'m trying to come up with an algorithm that will determine turning points in a trajectory of x/y coordinates. The following figures illustrates what I mean: green indicate

5条回答
  •  星月不相逢
    2020-12-23 02:32

    The approach you took sounds promising but your data is heavily oversampled. You could filter the x and y coordinates first, for example with a wide Gaussian and then downsample.

    In MATLAB, you could use x = conv(x, normpdf(-10 : 10, 0, 5)) and then x = x(1 : 5 : end). You will have to tweak those numbers depending on the intrinsic persistence of the objects you are tracking and the average distance between points.

    Then, you will be able to detect changes in direction very reliably, using the same approach you tried before, based on the scalar product, I imagine.

提交回复
热议问题