体彩站点查询:请教用过opencv的高手

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/01 01:35:06
我使用cvFindContours在用canny算字处理国的轮廓图中寻找轮廓时,编译和链接都没错,但是运行时总是出现内存不能写的错误。这个函数的参数如下int cvFindContours( CvArr* image, CvMemStorage* storage, CvSeq** first_contour,int header_size=sizeof(CvContour), int mode=CV_RETR_LIST,int method=CV_CHAIN_APPROX_SIMPLE, CvPoint offset=cvPoint(0,0) );我这样设定
CImageProcessDoc* pDoc=GetDocument();
CvMemStorage*storage=new CvMemStorage;
CvSeq*first_contour=new CvSeq;
cvFindContours(pDoc->m_pGrayImg,storage,&first_contour,sizeof(CvContour),CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE,cvPoint(0,0));
请问错在哪里?应该怎么改?