改成:
CvMemStorage* m_storage=cvCreateMemStorage(0); CvSeq * m_contour=0; cvFindContours( &IPlImage(img), m_storage, &m_contour, sizeof(CvContour), CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE, cvPoint(0,0)); //释放内存 cvReleaseMemStorage(&m_storage);
msdn:https://msdn.microsoft.com/en-us/library/f7yseh4d.aspx
一个对vector内存管理的详细解释:http://www.cnblogs.com/summerRQ/articles/2407974.html
小魏对opencv里内存问题的解答:http://blog.csdn.net/xiaowei_cqu/article/details/7586847
时间: 2024-10-24 01:31:31