可以用以下代码
using namespace cv;
RotatedRect rect;
Point2f vertices[4];
rect.points(vertices);
来获取旋转矩形的四个顶点,问题是这四个顶点怎么定义的?
头文件中注释给出的解释是:
/** returns 4 vertices of the rectangle
@param pts The points array for storing rectangle vertices.
The order is bottomLeft, topLeft, topRight, bottomRight.
*/
void points(Point2f pts[]) const;
一头雾水。
直到我找到了github代码中的文档。