From: Alexander Shishkov Date: Mon, 17 Feb 2014 14:10:08 +0000 (+0400) Subject: fixed incorrect code in introduction tutorial X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1314^2~595^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a8eab26bae0bc7f7f38e9e72235896311c65de72;p=platform%2Fupstream%2Fopencv.git fixed incorrect code in introduction tutorial --- diff --git a/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.rst b/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.rst index f582d32..9aa1f62 100644 --- a/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.rst +++ b/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.rst @@ -25,29 +25,34 @@ Let's use a simple program such as DisplayImage.cpp shown below. .. code-block:: cpp - #include - #include - - using namespace cv; - - int main( int argc, char** argv ) - { - Mat image; - image = imread( argv[1], 1 ); - - if( argc != 2 || !image.data ) - { - printf( "No image data \n" ); - return -1; - } - - namedWindow( "Display Image", CV_WINDOW_AUTOSIZE ); - imshow( "Display Image", image ); - - waitKey(0); - - return 0; - } + #include + #include + + using namespace cv; + + int main(int argc, char** argv ) + { + if ( argc != 2 ) + { + printf("usage: DisplayImage.out \n"); + return -1; + } + + Mat image; + image = imread( argv[1], 1 ); + + if ( !image.data ) + { + printf("No image data \n"); + return -1; + } + namedWindow("Display Image", CV_WINDOW_AUTOSIZE ); + imshow("Display Image", image); + + waitKey(0); + + return 0; + } Create a CMake file ---------------------