#include <iostream>
static void help()
{
cout << "This program demonstrates finding the minimum enclosing box, triangle or circle of a set\n"
<< "of points using functions: minAreaRect() minEnclosingTriangle() minEnclosingCircle().\n"
<< "Random points are generated and then enclosed.\n\n"
<< "Press ESC, 'q' or 'Q' to exit and any other key to regenerate the set of points.\n\n"
<< "Call:\n"
<< "./minarea\n"
<<
"Using OpenCV v" <<
CV_VERSION <<
"\n" << endl;
}
int main( int , char** )
{
help();
for(;;)
{
int i, count = rng.
uniform(1, 101);
vector<Point> points;
for( i = 0; i < count; i++ )
{
points.push_back(pt);
}
float radius = 0;
for( i = 0; i < count; i++ )
for( i = 0; i < 4; i++ )
for( i = 0; i < 3; i++ )
imshow(
"Rectangle, triangle & circle", img );
if( key == 27 || key == 'q' || key == 'Q' )
break;
}
return 0;
}