title: How to make a a polygon using only the outer points with OpenCV?
body: <p><a href="https://i.stack.imgur.com/Um2Dt.jpg" rel="nofollow noreferrer">Manually made example image of desired result</a></p>
  
  <p>I'm getting list of corner coordinates every time an object moves. I want to make a fillpoly with those coordinates so that I can make make a mask of only the object that is moving. The problem is that the corner coordinates are not in order so the polylines goes to random points regardless of the previous point and there are also corners inside the object. I need only the outer corners of the object so that I can make an outline and fill it. Any help will be welcomed, thank you guys in advance.</p>