samples/cpp/minarea.cpp
Примеры с cv2.imshow требуют сборки OpenCV с GUI. В ноутбуке с headless-версией используйте вывод изображений через Matplotlib.
Loading...
Searching...
No Matches
samples/cpp/minarea.cpp
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include <iostream>
using namespace cv;
using namespace std;
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";
}
int main( int , ** )
{
();
(, , , ::());
& = ();
(;;)
{
, = .(, );
<> ;
( = ; < ; ++ )
{
;
. = .(./, .*/);
. = .(./, .*/);
.();
}
[];
= ();
.();
<> ;
(, );
;
= ;
(, , );
= ::();
( = ; < ; ++ )
( , [], , (, , ), , );
( = ; < ; ++ )
(, [], [(+)%], (, , ), , );
( = ; < ; ++ )
(, [], [(+)%], (, , ), , );
(, , (), (, , ), , );
( , );
= ()();
( == || == || == )
;
}
;
}