2016-09-28 06:13:25 -0500 received badge ● Enthusiast 2016-09-26 11:22:25 -0500 asked a question Subdiv2d - points index Hi kind people, I used this function for Delaunay triangulation: // Draw delaunay triangles static void draw_delaunay( Mat& img, Subdiv2D& subdiv, Scalar delaunay_color ) { vector triangleList; subdiv.getTriangleList(triangleList); vector pt(3); Size size = img.size(); Rect rect(0,0, size.width, size.height); for( size_t i = 0; i < triangleList.size(); i++ ) { Vec6f t = triangleList[i]; pt = Point(cvRound(t), cvRound(t)); pt = Point(cvRound(t), cvRound(t)); pt = Point(cvRound(t), cvRound(t)); // Draw rectangles completely inside the image. if ( rect.contains(pt) && rect.contains(pt) && rect.contains(pt)) { line(img, pt, pt, delaunay_color, 1, CV_AA, 0); line(img, pt, pt, delaunay_color, 1, CV_AA, 0); line(img, pt, pt, delaunay_color, 1, CV_AA, 0); } }  } I noticed that subdiv2d doesn't return index of points, only coordinates, can anyone please give me an idea on how to make a structure that can do that. Thank you in advance. 2016-09-10 06:42:40 -0500 asked a question Delaunay triangulation - edge flip? I used this code: http://www.learnopencv.com/delaunay-t... for Delaunay triangulation, now I'm trying to figure out how to flip edges like this: http://i.imgur.com/RqAQKN5.png. I found that there is a member function of subdiv2d called "swapedges" which potentionally does exactly what I need but I don't know how it's supposed to be used, I'm pretty new at C++ and OpenCV and if there's anyone who could help me by showing an example of how it should work, I would be very thankful. Thanks in advance.