#include #include #include using namespace std; int main( int argc, char** argv ) { cv::Mat image; image = cv::imread("lenna.png"); // Read the file if(! image.data ) // Check for invalid input { cout << "Could not open or find the image" << endl ; return -1; } cv::namedWindow( "Display window", cv::WINDOW_AUTOSIZE );// Create a window for display. cv::imshow( "Display window", image ); // Show our image inside it. cv::waitKey(0); // Wait for a keystroke in the window return 0; }