1.求最小外接矩形
函数:Rect boundingRect(InputArray points)
功能:返回最小外接矩形
输入:可以为包含点的容器(vector)或是灰度图像Mat;
2.求最小旋转矩形
函数:RotatedRect minAreaRect(InputArray points)
功能:返回最小旋转外接矩形
输入:可以为包含点的容器(vector)或是灰度图像Mat;
参考opencv数据结构:https://docs.opencv.org/2.4/modules/core/doc/basic_structures.html#Size_