在读入数据那行代码imread在构建的时候出了很多问题啊但是还是谢谢你
[quote author="Guilherme Nascimento" date="1392989564"]使用“的iostream”,“cv”和“std”
尝试:
@#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main( int argc, char** argv )
{
if( argc != 2)
{
cout <<" Usage: display_image ImageToLoadAndDisplay" << endl;
return -1;
}
Mat image;
image = imread(“d:/1.jpg”, CV_LOAD_IMAGE_COLOR); // Read the file
if(! image.data )
{
cout << "Could not open or find the image" << std::endl ;
return -1;
}
namedWindow( "My Image", WINDOW_AUTOSIZE );
imshow( "Display window", image );
waitKey(5000);
return 0;
}@[/quote]