I can build and execute the code below successfully :
IplImage* img = cvLoadImage("C:\hello.jpg");
cvNamedWindow("myfirstwindow");
cvShowImage("myfirstwindow", img);
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);
although,I can build the code successfully.
I'm using opencv2.2 with VS2010 x86 version on windows 7 x86 version.
please help !
update: I tried it on winxp ,and it works fine...and it works fine with win7 on Release mode only.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…