IplImage* cvCapture* 的释放







        IplImage *pFrame = NULL;
	std::string pHashV_t;
	errno_t err;     //err==0 文件成功打开,err!=0文件打开失败
	FILE *fp;
	err=fopen_s(&fp,"1.txt","r+");           //数据库文档
	string picNtime;

	while (tms_startpFrame=cvQueryFrame(pCap);

		Mat pmFrame(pFrame,0);
	       pHashV_t=pHashValue(pmFrame);

		fwrite(pHashV_t.c_str(),pHashV_t.size(),1,fp);
		fprintf(fp,"\n");
		tms_start=tms_start+frmTime;
		 
     }
	fclose(fp);
	cvReleaseCapture(&pCap);
//	cvReleaseImage(&pFrame);


这种情况下只需要做 cvReleaseCapture(&pCap),而不需要做cvReleaseImage(&pFrame).

你可能感兴趣的:(opencv)