title: reduce coordinates for polygon matlab
body: <p>I have a set of coordinates representing some polygon. However, I need to reduce the number of coordinates while still staying as close as possible to the original polygons shape. For example, I need to cut one down to 20 points. Is there a known algorithm that does this? I am working in MATLAB if that helps.</p>
  
  <p>The context of the problem is using bwboundaries in matlab to find the borders of multiple images. I need the number of points for each image to be the same.</p>