I have a vector<vector<Point> >
X but I need to pass it to the function cvConvexityDefects
that takes in input a CvArr*
.
I have already read the topic Convexity defects C++ OpenCv. It takes in input these variables:
vector<Point>& contour, vector<int>& hull, vector<Point>& convexDefects
I cannot get the solution to work because I have a hull parameter that is a vector<Point>
and I don't know how to transform it in a vector<int>
.
So there are now two questions! :)
How can I convert a vector<vector<Point> >
into a vector<int>
?
Thanks in advance, have a good day!:)