samples/cpp/intersectExample.cpp
Примеры с cv2.imshow требуют сборки OpenCV с GUI. В ноутбуке с headless-версией используйте вывод изображений через Matplotlib.
Loading...
Searching...
No Matches
samples/cpp/intersectExample.cpp
Examples of how intersectConvexConvex works
/*
* Author: Steve Nicholson
*
* A program that illustrates intersectConvexConvex in various scenarios
*/
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
using namespace cv;
using namespace std;
// Create a vector of points describing a rectangle with the given corners
static vector<Point> makeRectangle(Point topLeft, Point bottomRight)
{
vector<Point> rectangle;
.();
.((., .));
.();
.((., .));
;
}
<> ( , , )
{
<> ;
.();
.();
.();
;
}
( &, <> , <> , = )
{
<> ;
<<> > ;
.();
.();
= (, , , );
( > )
{
(, , );
(!() || !())
{
= (, , );
}
(, , );
}
(, , , (, , ));
;
}
( &, , , )
{
=;
[];
(, , , , .());
(, , , , , (, , ));
}
()
{
(, , , (, , ));
;
= (,
((, ), (, )),
((, ), (, )));
(, (), , (, ));
= (,
((, ), (, )),
((, ), (, )));
(, (), , (, ));
= (,
((, ), (, )),
((, ), (, )),
);
(, (), , (, ));
= (,
((, ), (, )),
((, ), (, )),
);
(, (), , (, ));
= (,
((, ), (, )),
((, ), (, )),
);
(, (), , (, ));
= (,
((, ), (, )),
((, ), (, )),
);
(, (), , (, ));
= (,
((, ), (, )),
((, ), (, )),
);
(, (), , (, ));
= (,
((, ), (, )),
((, ), (, ), (, )),
);
(, (), , (, ));
= (,
((, ), (, )),
((, ), (, ), (, )),
);
(, (), , (, ));
<> ;
.((, ));
.((, ));
.((, ));
.((, ));
.((, ));
.((, ));
= (,
((, ), (, )),
,
);
(, (), , (, ));
(, );
();
}
()
{
();
}