Commit c11a7184 authored by Kirill Kornyakov's avatar Kirill Kornyakov

minarea.cpp sample reformatted

parent c55a37ad
#include "opencv2/highgui/highgui.hpp" #include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp" #include "opencv2/imgproc/imgproc.hpp"
#include <iostream> #include <iostream>
using namespace cv; using namespace cv;
using namespace std; using namespace std;
...@@ -14,13 +16,13 @@ void help() ...@@ -14,13 +16,13 @@ void help()
"Using OpenCV version %s\n" << CV_VERSION << "\n" << endl; "Using OpenCV version %s\n" << CV_VERSION << "\n" << endl;
} }
int main( int /*argc*/, char** /*argv*/ ) int main( int /*argc*/, char** /*argv*/ )
{ {
help();
Mat img(500, 500, CV_8UC3); Mat img(500, 500, CV_8UC3);
RNG& rng = theRNG(); RNG& rng = theRNG();
help();
for(;;) for(;;)
{ {
int i, count = rng.uniform(1, 101); int i, count = rng.uniform(1, 101);
...@@ -35,6 +37,7 @@ int main( int /*argc*/, char** /*argv*/ ) ...@@ -35,6 +37,7 @@ int main( int /*argc*/, char** /*argv*/ )
} }
RotatedRect box = minAreaRect(Mat(points)); RotatedRect box = minAreaRect(Mat(points));
Point2f center, vtx[4]; Point2f center, vtx[4];
float radius = 0; float radius = 0;
minEnclosingCircle(Mat(points), center, radius); minEnclosingCircle(Mat(points), center, radius);
...@@ -55,6 +58,6 @@ int main( int /*argc*/, char** /*argv*/ ) ...@@ -55,6 +58,6 @@ int main( int /*argc*/, char** /*argv*/ )
if( key == 27 || key == 'q' || key == 'Q' ) // 'ESC' if( key == 27 || key == 'q' || key == 'Q' ) // 'ESC'
break; break;
} }
return 0; return 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