title: reduce perimeter of polygon by eliminating points
body: <p>I don't know exactly how to state this question, so consider the following picture.<a href="https://i.stack.imgur.com/iIF10.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iIF10.png" alt="enter image description here"></a></p>
  
  <p>The polygons were generated by detecting contours of a rasterized map of different region boundaries. Notice the "inlets" created by letters in the original image. I'd like to identify sets of points which if the endpoints were connected would reduce the length of the polygon's perimeter by at least some value. I tried generating the convex hull for each polygon and basing the perimeter-savings on the difference in the distance between the polygon perimeter between hull vertices and the distance between the vertices but there is no guarantee that these vertices are near the edge of the "inlet".</p>
  
  <p>I feel like there is a term in computational geometry for this problem but don't know what it is. Do I have to compute the distance saved for each possible combination of starting/ending points or is there a simplified algorithm which does this recursively?</p>
  
  <p>An example of when using the convex hull breaks down is the polygon in the center of the following example:
  <a href="https://i.stack.imgur.com/1q2XP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1q2XP.png" alt="enter image description here"></a></p>
  
  <p>Here, the convex hull connects the corners of the polygon whereas I only want to close off the large inlet on the right side of the polygon while retaining the curvature of that side.</p>