我在 Ubuntu 16(LTS) 上使用 OpenCV 3.2 和 Netbeans 8.0。
CvQuadEdge2D 在 OpenCV 2 中非常有用,但似乎已从 OpenCV 3 中消失。我能找到的最接近的是
struct CV_EXPORTS QuadEdge
{
QuadEdge();
QuadEdge(int edgeidx);
bool isfree() const;
int next[4];
int pt[4];
};
在 imageproc.hpp 中。然而
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <windows.h>
#include <string.h>
#include <cv.hpp>
#include <highgui.h>
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
int main(){
struct CV_EXPORTS QuadEdge* edge
}
导致 QuadEdge 为“未定义”。
最佳答案
在 OpenCV 3 中 CvQuadEdge2D
背后的概念在Edge
.
现在您可以使用 getEdge
浏览边缘.您可以使用 getEdgeList
获取所有边的顶点列表
QuadEdge
本身是 Subdiv2d
类的 protected 成员,因此您无法访问它。您应该使用新 Edge
界面。
关于c++ - CvQuadEdge2D 在 OpenCV 3 中是否具有等效项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42789323/