Edge index always -1

asked 2013-02-05 14:40:53 -0500

ovaal gravatar image

Hi

I'm trying to obtain the index of the vertices from the Delaunay triangulation. Because it's quite a bit of code in all I'll only show the important bits, but I found here: https://code.ros.org/trac/opencv/browser/trunk/opencv/samples/c/delaunay.c?rev=1429

The function I use to get to the edges: CvSubdiv2DPoint* pt= cvSubdiv2DEdgeOrg( edge ). Where edge is of type CvSubdiv2DEdge. To get the index: int index= pt->id; But this is always giving me -1 for every edge. I would like to get the indices to correspond with the order by which the points have been subdivided. I hope this is possible.

edit retag flag offensive close merge delete