How to determine path from noisy X, Y data

后端 未结 10 1975
星月不相逢
星月不相逢 2021-02-08 21:54

I have an unsorted list of noisy X, Y points. They do, however, form a path through the world. I would like an algorithm to draw an approximation of this data using line segment

相关标签:
10条回答
  • 2021-02-08 22:25

    Bezier Interpolation may fit your problem.

    Bezier Interpolation

    This does not address the ordering of the points into a path, however; there are a number of approaches to consider:

    • Any "optimal" type of path (e.g. smallest direction change at each point on the path, * Shortest path through all points) will likely boil down the NP complete Travelling Salesman Problem (TSP).
    • A "reasonable" path to cluster the nodes and then route between clusters, and within clusters. Of course, the larger the cluster, or the larger the number of clusters the more this smaller problem looks like a large n TSP.
    • Ordering the points by one axis. If there are much more than 2 axes, some dimensional reduction strategy may be useful. e.g. Independent Component Analysis.
    0 讨论(0)
  • 2021-02-08 22:25

    If your points are close to each other, you can normal "straight" lines (orthogonal lines). Using the normal smoothing algorithms. You can see the world as being flat.

    If they are far apart, you need to compensate for the rounding of the earth, by using great circles to navigate from point to point. Otherwise your straight lines will make a longer way.

    It is your choice if a point is too far to create straight lines.

    Further you have to know if you need to "visit" each point, or just need to go near, and how near that near is.

    If you need to send the course(s) to a plane, ship or other traveller, you probably need to visit each point. If you get the GPS data from an object, you probably just want to plot a course on a screen, and remove the noise.


    After seeing your edits: If this is an object moving some traject you want to plot, you might want to smooth the direction and speed instead of the x/y values. (Making your measured values (x) have a fixed and increasing Y-interval makes smoothing a lot easier.)

    0 讨论(0)
  • 2021-02-08 22:25

    It seems that you know the 'golden curve' from your answers to questions, I would suggest finding the Bezier curve of the 'golden curve' as suggested by @jamesh and drawing that.

    0 讨论(0)
  • The problem with the Bezier curve is that is doesn't actually go though the points you have sampled and even though the points samples are distorted a little; the bezier curve might actually be miles off.

    A better approximation, and a solution that seems to resemble the original image way better is a Catmull-Rom Spline because it does run though all the points in the curve.

    0 讨论(0)
提交回复
热议问题