title: C++-ObjC OpenCV Constrained Delaunay
body: <p>I succesfully implemented a Delaunay triangulation of a contour in OpenCV 2.3.1.</p>
  <p>With cvPointPolygonTest I can get all the triangles in the convex hull, then I tried to perform another cvPointPolygonTest on triangles centroid to know if they are <strong>in the main contour or not</strong>, so I can have the constrained triangulation of the contour.</p>
  <p>But, it doesn't work well, as some triangles are (eg. with a walking man who has his two legs distant) <strong>'over' a hole</strong>.</p>
  <p>Does anyone know a way to perform a constrained triangulation. I thought about convexityDefects, but can't manage to understand how to begin with this.</p>
  <p>Thanks in advance !</p>
  <p>Ben</p>
  <hr />
  <p>In fact, it is not a Convex Hull defects problem, but a triangulation one. This image will show you the trouble :</p>
  <p><a href="https://i.stack.imgur.com/TMZPQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TMZPQ.png" alt="" /></a></p>
  
  <p>Particularly in the bottom of the triangulated hull, you can see that the triangulation is in AND out of the contour, because OpenCV is triangulating the convex hull. I would like to find a way to triangulate the contour itself.</p>
  <p>I found some ideas about adding Steiner Points in the contour itself, but can't find where to begin with OpenCV.</p>
  <p>My idea was to :</p>
  <ul>
  <li>test if the triangle is in AND out of the contour ;</li>
  <li>if true : get the intersection point ;</li>
  <li>and add it to the cvSubdiv2D.</li>
  </ul>
  <p>Am I right with this ?</p>
  <p>Thanks for your patience and your answers !</p>