The class represents rotated (i.e. More...
#include "types.hpp"
Public Member Functions | |
RotatedRect () | |
various constructors More... | |
RotatedRect (const Point2f ¢er, const Size2f &size, float angle) | |
RotatedRect (const Point2f &point1, const Point2f &point2, const Point2f &point3) | |
Any 3 end points of the RotatedRect. More... | |
Rect | boundingRect () const |
returns the minimal up-right integer rectangle containing the rotated rectangle More... | |
Rect_< float > | boundingRect2f () const |
returns the minimal (exact) floating point rectangle containing the rotated rectangle, not intended for use with images More... | |
void | points (Point2f pts[]) const |
returns 4 vertices of the rectangle More... | |
Public Attributes | |
float | angle |
Point2f | center |
Size2f | size |
The class represents rotated (i.e.
not up-right) rectangles on a plane.
Each rectangle is specified by the center point (mass center), length of each side (represented by cv::Size2f structure) and the rotation angle in degrees.
The sample below demonstrates how to use RotatedRect:
cv::RotatedRect::RotatedRect | ( | ) |
various constructors
center | The rectangle mass center. |
size | Width and height of the rectangle. |
angle | The rotation angle in a clockwise direction. When the angle is 0, 90, 180, 270 etc., the rectangle becomes an up-right rectangle. |
cv::RotatedRect::RotatedRect | ( | const Point2f & | point1, |
const Point2f & | point2, | ||
const Point2f & | point3 | ||
) |
Any 3 end points of the RotatedRect.
They must be given in order (either clockwise or anticlockwise).
Rect cv::RotatedRect::boundingRect | ( | ) | const |
returns the minimal up-right integer rectangle containing the rotated rectangle
Rect_<float> cv::RotatedRect::boundingRect2f | ( | ) | const |
returns the minimal (exact) floating point rectangle containing the rotated rectangle, not intended for use with images
void cv::RotatedRect::points | ( | Point2f | pts[] | ) | const |
returns 4 vertices of the rectangle
pts | The points array for storing rectangle vertices. |
float cv::RotatedRect::angle |
Point2f cv::RotatedRect::center |
Size2f cv::RotatedRect::size |