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