Commit dac715ad authored by Suleyman TURKMEN's avatar Suleyman TURKMEN

Update imgproc.hpp

parent 061131a5
...@@ -1689,7 +1689,8 @@ See the line detection example below: ...@@ -1689,7 +1689,8 @@ See the line detection example below:
#include <opencv2/highgui.hpp> #include <opencv2/highgui.hpp>
using namespace cv; using namespace cv;
using namespace std;
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
Mat src, dst, color_dst; Mat src, dst, color_dst;
...@@ -1774,11 +1775,12 @@ Example: : ...@@ -1774,11 +1775,12 @@ Example: :
#include <math.h> #include <math.h>
using namespace cv; using namespace cv;
using namespace std;
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
Mat img, gray; Mat img, gray;
if( argc != 2 && !(img=imread(argv[1], 1)).data) if( argc != 2 || !(img=imread(argv[1], 1)).data)
return -1; return -1;
cvtColor(img, gray, COLOR_BGR2GRAY); cvtColor(img, gray, COLOR_BGR2GRAY);
// smooth it, otherwise a lot of false circles may be detected // smooth it, otherwise a lot of false circles may be detected
...@@ -1797,6 +1799,8 @@ Example: : ...@@ -1797,6 +1799,8 @@ Example: :
} }
namedWindow( "circles", 1 ); namedWindow( "circles", 1 );
imshow( "circles", img ); imshow( "circles", img );
waitKey(0);
return 0; return 0;
} }
@endcode @endcode
......
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