2

I'm searching for a way to smooth coordinates. For example, given the coordinates

co = [(1,10), (2,10), (3,9), (3,8), (3,7), (2,6), ...]

I would like smooth them like this:

enter image description here

What algorithm or library should I use?

Is this possibly related Smooth a trajectory with splrep?

Cœur
  • 37,241
  • 25
  • 195
  • 267
bux
  • 7,087
  • 11
  • 45
  • 86

1 Answers1

1

Douglas-Peucker algorithm is intended to simplify polylines. I think there are some Python implementations. One example

Community
  • 1
  • 1
MBo
  • 77,366
  • 5
  • 53
  • 86
  • I wrote an answer with a little animation of the Douglas-Peucker algorithm if you are interested... http://stackoverflow.com/a/36937976/2836621 – Mark Setchell May 03 '16 at 13:55