View Source Evision.RotatedRect (Evision v0.2.9)
Summary
Types
@type t() :: %Evision.RotatedRect{ref: reference()}
Type that represents an RotatedRect
struct.
ref.
reference()
The underlying erlang resource variable.
Functions
@spec boundingRect2f(Keyword.t()) :: any() | {:error, String.t()}
@spec boundingRect2f(t()) :: {number(), number(), number(), number()} | {:error, String.t()}
boundingRect2f
Positional Arguments
- self:
Evision.RotatedRect.t()
Return
- retval:
Rect2f
Python prototype (for reference only):
boundingRect2f() -> retval
@spec boundingRect(Keyword.t()) :: any() | {:error, String.t()}
@spec boundingRect(t()) :: {number(), number(), number(), number()} | {:error, String.t()}
boundingRect
Positional Arguments
- self:
Evision.RotatedRect.t()
Return
- retval:
Rect
Python prototype (for reference only):
boundingRect() -> retval
@spec points(Keyword.t()) :: any() | {:error, String.t()}
@spec points(t()) :: [{number(), number()}] | {:error, String.t()}
points
Positional Arguments
- self:
Evision.RotatedRect.t()
Return
pts:
[Point2f]
.The points array for storing rectangle vertices. The order is bottomLeft, topLeft, topRight, bottomRight.
returns 4 vertices of the rotated rectangle Note: Bottom, Top, Left and Right sides refer to the original rectangle (angle is 0), so after 180 degree rotation bottomLeft point will be located at the top right corner of the rectangle.
Python prototype (for reference only):
points() -> pts
@spec rotatedRect() :: {{number(), number()}, {number(), number()}, number()} | {:error, String.t()}
RotatedRect
Return
- self:
{centre={x, y}, size={s1, s2}, angle}
Python prototype (for reference only):
RotatedRect() -> <RotatedRect object>
@spec rotatedRect({number(), number()}, {number(), number()}, {number(), number()}) :: {{number(), number()}, {number(), number()}, number()} | {:error, String.t()}
@spec rotatedRect({number(), number()}, {number(), number()}, number()) :: {{number(), number()}, {number(), number()}, number()} | {:error, String.t()}
Variant 1:
RotatedRect
Positional Arguments
- point1:
Point2f
- point2:
Point2f
- point3:
Point2f
Return
- self:
{centre={x, y}, size={s1, s2}, angle}
Any 3 end points of the RotatedRect. They must be given in order (either clockwise or anticlockwise).
Python prototype (for reference only):
RotatedRect(point1, point2, point3) -> <RotatedRect object>
Variant 2:
RotatedRect
Positional Arguments
center:
Point2f
.The rectangle mass center.
size:
Size2f
.Width and height of the rectangle.
angle:
float
.The rotation angle in a clockwise direction. When the angle is 0, 90, 180, 270 etc., the rectangle becomes an up-right rectangle.
Return
- self:
{centre={x, y}, size={s1, s2}, angle}
full constructor
Python prototype (for reference only):
RotatedRect(center, size, angle) -> <RotatedRect object>