title: opencv corner detection on object contour
body: <p>I have images of a smelting cube, forming into a droplet over time. So far, i extracted the contour of it, but next i'd need to to distinguish between object and surface. My Idea is to detect the corners where object touches surface, but i am struggling to find a reasonable approach how to do so (preferably using the c++ interface of opencv). I'd appreciate any suggestions.<br>
  Here are some examples of the extracted contour:<br>
  <img src="https://i.imgur.com/CqmNXPW.png" alt="1"> <img src="https://i.imgur.com/bywmUQf.png" alt="2"> <img src="https://i.imgur.com/5noxbbU.png" alt="3"> <img src="https://i.imgur.com/oTFz0xj.png" alt="4"></p>
  
  <p>edit:
  @Haris:</p>
  
  <p>i have tried a variant of your suggestion and it is doing the job for me:  </p>
  
  <p><img src="https://i.imgur.com/pMulz2f.png" alt="r1"> <img src="https://i.imgur.com/xNFSv0G.png" alt="r2"> <img src="https://i.imgur.com/wHRlmk5.png" alt="r2">  </p>
  
  <p>In the approximated contour i approach from the left, looking for the first angle with a value in a specified range, then the same from the right. As the approximated contour points are a subset of the original contour points, I then identify the 2 corner points in the original sequence, and cut it at both corners. The middle part i take as the droplet, and the left and right part, i reassamble to be my surface line. There might be better, more stable approaches, but this works for me. Thanks!</p>