Table of Contents

Struct RotatedRect

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

The class represents rotated (i.e. not up-right) rectangles on a plane.

[SuppressMessage("Design", "CA1051: Do not declare visible instance fields")]
public record struct RotatedRect : IEquatable<RotatedRect>
Implements
Inherited Members

Constructors

RotatedRect(Point2f, Point2f, Point2f)

Any 3 end points of the RotatedRect. They must be given in order (either clockwise or anticlockwise).

RotatedRect(Point2f, Size2f, float)

Constructor

Fields

Angle

the rotation angle. When the angle is 0, 90, 180, 270 etc., the rectangle becomes an up-right rectangle.

Center

the rectangle mass center

Size

width and height of the rectangle

Methods

BoundingRect()

returns the minimal up-right rectangle containing the rotated rectangle

FromThreeVertexPoints(Point2f, Point2f, Point2f)

Any 3 end points of the RotatedRect. They must be given in order (either clockwise or anticlockwise).

Points()

returns 4 vertices of the rectangle