0
我有下面的代碼片段:錯誤的cvApproxPoly功能
int count = (int)sizes.size();
CvPoint2D32f p;
CvSeq* seq = cvCreateSeq(CV_SEQ_KIND_GENERIC|CV_32FC2, sizeof(CvSeq), sizeof(CvPoint2D32f), memStorage1);
CvSeq* result;
for (int i=0;i<count;i++) {
p.x = sizes[i];
p.y = depths[i];
cvSeqPush(seq, &p);
}
result = cvApproxPoly(seq, sizeof(CvPoint2D32f), memStorage2, CV_POLY_APPROX_DP, 3, 0);
但是這個代碼拋出異常:錯誤:錯誤的參數(不支持的序列類型)在cvApproxPoly 什麼是錯在我的代碼?在文檔它說,cvApproxPoly採用第一個參數作爲CvSeq *