如何将cvSeq *转换为vector<矢量<点> > ?
这是我的代码:
first_contour = NULL;
cvFindContours(
src_copy_gray,
storage,
&first_contour,
sizeof(CvContour),
CV_RETR_TREE );
// Finding convex Hull
CvMemStorage* hull_storage = cvCreateMemStorage();
CvSeq* retHulls = NULL;
CvMat* tmp;
cv::Mat tmp22;
// drawing contours
ff = cv::Mat::zeros( tmp4.size(), CV_8UC3 );
draw = new IplImage(ff);
for(CvSeq* i = first_contour; i != 0; i = i->h_next){
cvDrawContours(draw,i,cv::Scalar(255,255,0,0),cv::Scalar(255,0,0,0),0,1,8);
retHulls = cvConvexHull2(i,hull_storage,CV_CLOCKWISE,1);
cvDrawContours(draw,retHulls,cv::Scalar(255,0,0,0),cv::Scalar(255,0,0,0),0,1,8);
for (int k = 0; k < vertices_number; k++)
{
if(pointPolygonTest( ??????, cv::Point2f(verticesB[k].x,verticesB[k].y), false )>0){
cv::line( ff,cv::Point2f(verticesB[k].x,verticesB[k].y), cv::Point2f(verticesB[k].x,verticesB[k].y), cv::Scalar(255,0,255 ), 2, 8 );
}
}
}
我该怎么做而不是????? 我知道一个cv :: _ InputArray,但我不知道如何将cvseq * retHulls转换为cv :: _ InputArray,就像矢量矢量。