From dac715ad1f641cdd60a4b3a6718de3133f87c1df Mon Sep 17 00:00:00 2001 From: Suleyman TURKMEN Date: Thu, 11 Jun 2015 11:03:14 +0300 Subject: [PATCH] Update imgproc.hpp --- modules/imgproc/include/opencv2/imgproc.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/imgproc/include/opencv2/imgproc.hpp b/modules/imgproc/include/opencv2/imgproc.hpp index 371fd9466b..d0b549b686 100644 --- a/modules/imgproc/include/opencv2/imgproc.hpp +++ b/modules/imgproc/include/opencv2/imgproc.hpp @@ -1689,7 +1689,8 @@ See the line detection example below: #include using namespace cv; - + using namespace std; + int main(int argc, char** argv) { Mat src, dst, color_dst; @@ -1774,11 +1775,12 @@ Example: : #include using namespace cv; - + using namespace std; + int main(int argc, char** argv) { Mat img, gray; - if( argc != 2 && !(img=imread(argv[1], 1)).data) + if( argc != 2 || !(img=imread(argv[1], 1)).data) return -1; cvtColor(img, gray, COLOR_BGR2GRAY); // smooth it, otherwise a lot of false circles may be detected @@ -1797,6 +1799,8 @@ Example: : } namedWindow( "circles", 1 ); imshow( "circles", img ); + + waitKey(0); return 0; } @endcode