title: Outer Bounding Points of Image/Shape using C#
body: <p>I have some images that I'd like to draw a polyon around the outer edges. The images themselves are on transparent backgrounds and I've created an array of the pixels in the images which contain a point and are not transparent (or white).</p>
  
  <p>Now, my question is: how do I draw an accurate polygon around the outer edge points? I've used a <a href="http://www.aforgenet.com/" rel="nofollow">Graham Scan algorithm</a> that I read about to create a convex hull around the edges but this doesn't seem to work for objects with concavities. For example:</p>
  
  <p><a href="http://i48.tinypic.com/4s0lna.png" rel="nofollow">http://i48.tinypic.com/4s0lna.png</a></p>
  
  <p>The image on the left gets filled in using this method with the one on the right. As you can see, it's 'filling in' a little too much.</p>
  
  <p>I assume there must be some <em>other</em> algorithm or approach that can be used to solve this, but I'm not sure of where to look or what it might be called. Could anyone point me in the right direction? I'm using C#/.net and hopefully there might be something that already exists which could work along these lines.</p>