在backgroundWorker c ++中使用cvReleaseImage时出错

时间:2017-01-19 08:21:11

标签: opencv visual-c++ c++-cli

在backgroundWorker c ++

中没有使用cvReleaseImage来清理内存
IplImage* image2 = NULL;
image2 = cvCreateImage(cvSize(frame1.cols, frame1.rows), 8, 3);
IplImage ipltemp = frame1;
cvCopy(&ipltemp, image2);
pictureBox_frame->Image = gcnew //replacement of cvShowIma
System::Drawing::Bitmap(image2->width, image2->height, image2->widthStep,
System::Drawing::Imaging::PixelFormat::Format24bppRgb, (System::IntPtr)image2->imageData);

**cvReleaseImage(&image2);**

enter image description here

0 个答案:

没有答案