Skip to main content
edited tags
Link
Paul
  • 12.2k
  • 8
  • 59
  • 132
Source Link
Beni Bogosel
  • 1.1k
  • 9
  • 15

Fit best polygon to a discrete contour

I have a discrete contour represented by a set of points. The contour looks like a polygon but if you zoom you see that the edges are rugged (that's because it was obtained while working on a finite differences grid)

I would like to fit a polygon to this contour (which is closest in the least-squares sense). Are there any simple known algorithms to do this?

enter image description here