描述 The Archeologists of the Current Millenium (ACM) now and then discover ancient artifacts located at vertices of regular polygons. The moving sand dunes of the desert render the excavations difficult and thus once three vertices of a polygon are di…
寻找包裹轮廓的最小正矩形:boundingRect 函数 返回矩阵应满足:① 轮廓上的点均在矩阵空间内.② 矩阵是正矩阵(矩形的边界与图像边界平行). Rect boundingRect(InputArray points); 唯一一个参数是输入的二维点集,可以是 vector 或 Mat 类型. 代码示例: #include<opencv.hpp> #include<iostream> using namespace cv; using namespace std; int ma…