【发布时间】:2012-04-19 02:23:40
【问题描述】:
我有一个vector<vector<Point> > X,但我需要将它传递给函数cvConvexityDefects,该函数接受CvArr* 的输入。
我已经阅读了主题Convexity defects C++ OpenCv。它接受这些变量的输入:
vector<Point>& contour, vector<int>& hull, vector<Point>& convexDefects
我无法让解决方案正常工作,因为我有一个 vector<Point> 的船体参数,但我不知道如何将其转换为 vector<int>。
所以现在有两个问题! :)
如何将vector<vector<Point> > 转换为vector<int>?
提前致谢,祝你有美好的一天!:)
【问题讨论】:
-
您使用哪个版本的 OpenCV?
-
2.3.1,最后一个...从网站opencv.willowgarage.com/wiki下载