在OpenCV的VS2010 +未处理的异常
我能成功地在下面建立和执行code:
I can build and execute the code below successfully :
IplImage* img = cvLoadImage("C:\\hello.jpg");
cvNamedWindow("myfirstwindow");
cvShowImage("myfirstwindow", img);
但在执行时,我得到了未处理的异常低于code:
But I got the unhandled exception when executed the code below:
cv::Mat image= cv::imread("boldt.jpg");
cv::namedWindow("Image");
cv::imshow("Image",image);
虽然,我可以成功建立code。
although,I can build the code successfully.
我使用opencv2.2在Windows VS2010 x86版7 x86版。
请大家帮忙!
I'm using opencv2.2 with VS2010 x86 version on windows 7 x86 version. please help !
更新:我试了一下在WinXP,并能正常工作...它在释放模式正常工作与WIN7只
update: I tried it on winxp ,and it works fine...and it works fine with win7 on Release mode only.
我使用的OpenCV 2.3.1,当我在释放模式(与释放highgui lib)中运行它,一切都很好。
当我切换到调试模式(依然与释放highgui LIB),它崩溃。
链接到调试highgui LIB帮助。
I'm using OpenCV 2.3.1 and when I run it in Release mode (linked to a release highgui lib), everything is fine. When I switch to Debug mode (still linked to a release highgui lib), it crashes. Linking to a debug highgui lib helped.
也许你有同样的问题...
Maybe you have the same problem...