问题描述
- opencv 入门问题求解!
- 我现在安装了opencv 2.4.10 和vs2010 我调试了下面的程序为什么摁了F5以后感觉程序没有反应?(感觉就像窗口刷新了一遍但是没有矩阵输出)
请问这是什么原因呢?另外我调试最简单的图片输出也是不能用Mat类调试,要使用Mat类的话就会说我“rR 6010 Abort has been called”就卡在那里了! 求大神指点一下!please!#include<iostream>#include <opencv2/core/core.hpp>//#include <opencv2/highgui/highgui.hpp>#include <opencv2/opencv.hpp>using namespace std; using namespace cv; int main(int argc char*argv[]) {Mat m(32CV_8UC3Scalar(00255));cout<<""M==""<< endl << """"<< m <<endl; //return 0;}
'SSSSSSS.exe': Loaded 'F:TDDOWNLOADSSSSSSSDebugSSSSSSS.exe' Symbols loaded.
'SSSSSSS.exe': Loaded 'C:WindowsSystem32ntdll.dll' Symbols loaded (source information stripped).
'SSSSSSS.exe': Loaded 'C:WindowsSystem32kernel32.dll' Symbols loaded (source information stripped).
'SSSSSSS.exe': Loaded 'C:WindowsSystem32KernelBase.dll' Symbols loaded (source information stripped).
'SSSSSSS.exe': Loaded 'F:opencvbuildx86vc10binopencv_core2410.dll' Cannot find or open the PDB file
'SSSSSSS.exe': Loaded 'C:WindowsSystem32msvcp100.dll' Symbols loaded (source information stripped).
'SSSSSSS.exe': Loaded 'C:WindowsSystem32msvcr100.dll' Symbols loaded (source information stripped).
'SSSSSSS.exe': Loaded 'C:WindowsSystem32msvcp100d.dll' Symbols loaded (source information stripped).
'SSSSSSS.exe': Loaded 'C:WindowsSystem32msvcr100d.dll' Symbols loaded (source information stripped).
The program '[8000] SSSSSSS.exe: Native' has exited with code 0 (0x0).
解决方案
#include
#include
#include
using namespace std;
using namespace cv;
int main(int argc char*argv[])
{
Mat m(32CV_8UC3Scalar(00255));
cout<<""M==""<< endl << """"<< m <<endl;
imshow(""m""m);
waitKey();
return 0;
}
这样试试看
解决方案二:
运行的时候选正常运行,别选调试