在调试OpenCV项目期间访问违规

时间:2015-12-02 18:57:50

标签: c++ opencv visual-studio-2013

我尝试使用OpenCV库运行Visual Studio 2013程序,但它没有工作,因为我有一个Access违规执行位置。我已经阅读过其他帖子,但它仍然没有用。

这是完整的程序代码:

#include "opencv2\highgui\highgui.hpp"
using namespace cv;
int main(int argc, char **argv)
{ 
     Mat image = imread(argv[1], -1);
     if (img.empty())
         return -1;
     namedWindow("Example", WINDOW_AUTOSIZE);
     imshow("Example", img);
     waitKey(0);
     destroyWindow("Example");
}

错误讯息:

0 个答案:

没有答案
相关问题