mat::release()的时候一直报错,跳过release让函数自动释放也不
opencv吧
全部回复
仅看楼主
level 11
geral 楼主
整了一晚上都没解决,环境是win8.1,VS2010,opencv2.4.10
求各位老手解答 - -
#include "stdafx.h"
#include <iostream>
#include "opencv2\\core\\core.hpp"
#include "opencv2\\highgui\\highgui.hpp"
#ifdef _DEBUG
#pragma comment(lib,"lib\\opencv_highgui2410d.lib")
#pragma comment(lib,"lib\\opencv_calib3d2410d.lib")
#else
#pragma comment(lib,"lib\\opencv_highgui2410.lib")
#pragma comment(lib,"lib\\opencv_calib3d2410.lib")
#endif
using std::cout;
using std::endl;
using namespace cv;
int _tmain(int argc, _TCHAR* argv[])
{
std::string a="D:\\pic.jpg";
Mat img=imread(a,0);//读入一张图片
if(!img.data){
std::cout<<"no data"<<std::endl;
return 1;
}
img.release();//这里报错!
return 0;
}
2016年08月02日 15点08分 1
level 1
mat.realse();调用的是这个类的成员函数啊亲。
2017年12月24日 11点12分 3
1