1 | initial version |
you can use boundingRect function the first parameter of this function is the list of points in the squar
2 | No.2 Revision |
you can use boundingRect function the first parameter of this function is the list of points in the squar
Example:
vector<Point> contour;
contour.push_back(Point2f(0, 0));
contour.push_back(Point2f(10, 0));
contour.push_back(Point2f(10, 10));
contour.push_back(Point2f(5, 4));
Rect ResultedboundingRect = boundingRect(contour);