I am using NetBeans 7.1 on Ubuntu 11.04 and would like to obtain triangles from a set of points using OpenCV. I build the Delaunay triangulation as follows.
CvMemStorage *storage;
size_t ptIndex;
CvSubdiv2D* subdiv;
storage = cvCreateMemStorage(0);
subdiv = cvCreateSubdivDelaunay2D( boundRect, storage );
for (ptIndex = 0; ptIndex<numPts; ptIndex++)
cvSubdivDelaunay2DInsert(subdiv, points[ptIndex]);
That part seems to work OK. It runs and the resulting storage looks like this.
storage 0xb287a90
signature 1116274688
bottom 0x2a2d57a0
prev 0x0
next 0x2a2e5730
top 0x2cc947d0
prev 0x2cc84840
next 0x0
parent 0x0
signature
bottom
top
parent
block_size
free_space
block_size 65408
free_space 0
I have look at the documentation for these functions here but cannot find any function for extracting the triangles.
I would be most grateful if someone could tell me how to extract the triangles.
Peter.