我想用opencv加载图像。一切正常,但没有显示图像。我使用的代码在这里:#include #include #include
using namespace cv;
using namespace std;
int main( int argc, const char** argv )
{
IplImage *img = cvLoadImage("D:/C++/ MGC.JPG");
cvNamedWindow("MyWindow", 1); //create a window with the name "MyWindow"
cvMoveWindow("MyWindow", 100, 100);
cvShowImage("MyWindow", img);
cvWaitKey(0); //wait infinite time for a keypress
cvDestroyWindow("MyWindow"); //destroy the window with the name, "MyWindow"
return 0;
}