RotatedRect object type

The last useful class is a particular rectangle called RotatedRect. This class represents a rotated rectangle specified by a center point, the width and height of a rectangle, and the rotation angle in degrees:

RotatedRect(const Point2f& center, const Size2f& size, float angle); 

An interesting function of this class is boundingBox. This function returns Rect, which contains the rotated rectangle:

Get Building Computer Vision Projects with OpenCV 4 and C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.