Commit a8eab26b authored by Alexander Shishkov's avatar Alexander Shishkov

fixed incorrect code in introduction tutorial

parent 8cbb284b
...@@ -30,19 +30,24 @@ Let's use a simple program such as DisplayImage.cpp shown below. ...@@ -30,19 +30,24 @@ Let's use a simple program such as DisplayImage.cpp shown below.
using namespace cv; using namespace cv;
int main( int argc, char** argv ) int main(int argc, char** argv )
{ {
if ( argc != 2 )
{
printf("usage: DisplayImage.out <Image_Path>\n");
return -1;
}
Mat image; Mat image;
image = imread( argv[1], 1 ); image = imread( argv[1], 1 );
if( argc != 2 || !image.data ) if ( !image.data )
{ {
printf( "No image data \n" ); printf("No image data \n");
return -1; return -1;
} }
namedWindow("Display Image", CV_WINDOW_AUTOSIZE );
namedWindow( "Display Image", CV_WINDOW_AUTOSIZE ); imshow("Display Image", image);
imshow( "Display Image", image );
waitKey(0); waitKey(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment