我在 Ubuntu 11.04 上使用 NetBeans 7.1,并希望使用 OpenCV 从一组点中获取三角形。我按如下方式构建 Delaunay 三角剖分。
CvMemStorage *storage;
size_t ptIndex;
CvSubdiv2D* subdiv;
storage = cvCreateMemStorage(0);
subdiv = cvCreateSubdivDelaunay2D( boundRect, storage );
for (ptIndex = 0; ptIndex<numPts; ptIndex++)
cvSubdivDelaunay2DInsert(subdiv, points[ptIndex]);
那部分似乎工作正常。它运行并且生成的存储看起来像这样。
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
我在这里查看了这些函数的文档,但找不到任何用于提取三角形的函数。
如果有人能告诉我如何提取三角形,我将不胜感激。
彼得。