OpenCV for Unity 2.6.3
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
Loading...
Searching...
No Matches
OpenCVForUnity.CoreModule.RotatedRect Class Reference

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

Inheritance diagram for OpenCVForUnity.CoreModule.RotatedRect:

Public Member Functions

 RotatedRect ()
 
 RotatedRect (Point c, Size s, double a)
 full constructor
 
 RotatedRect (double[] vals)
 
void set (double[] vals)
 
void points (Point[] pt)
 returns 4 vertices of the rotated rectangle
 
Rect boundingRect ()
 
RotatedRect clone ()
 
override int GetHashCode ()
 
override bool Equals (Object obj)
 
override string ToString ()
 
 RotatedRect (in Vec5d vals)
 full constructor
 
 RotatedRect (in(double x, double y, double width, double height, double angle) vals)
 full constructor
 
void set (in Vec5d vals)
 
void set (in(double x, double y, double width, double height, double angle) vals)
 
void points (ref Vec2d[] pt)
 returns 4 vertices of the rotated rectangle
 
void points (ref(double x, double y)[] pt)
 returns 4 vertices of the rotated rectangle
 
Vec4i boundingRectAsVec4i ()
 
int int int int height boundingRectAsValueTuple ()
 
Vec5d cloneAsVec5d ()
 
double double double double double angle cloneAsValueTuple ()
 
double double double double double angle ToValueTuple ()
 
Vec5d ToVec5d ()
 
bool Equals (RotatedRect a)
 

Static Public Member Functions

static operator Vec5d (RotatedRect rotatedRect)
 
static operator (double x, double y, double width, double height, double angle)(RotatedRect rotatedRect)
 
static operator RotatedRect (in(double x, double y, double width, double height, double angle) valueTuple)
 
static bool operator== (RotatedRect a, RotatedRect b)
 
static bool operator!= (RotatedRect a, RotatedRect b)
 

Public Attributes

Point center
 
Size size
 
double angle
 
int x
 
int int y
 
int int int width
 
double x
 
double double y
 
double double double width
 
double double double double height
 

Detailed Description

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 Size2f structure) and the rotation angle in degrees.

C++: cv::RotatedRect Class Reference

See also
https://docs.opencv.org/4.10.0/db/dd6/classcv_1_1RotatedRect.html

Constructor & Destructor Documentation

◆ RotatedRect() [1/5]

OpenCVForUnity.CoreModule.RotatedRect.RotatedRect ( )

default constructor

◆ RotatedRect() [2/5]

OpenCVForUnity.CoreModule.RotatedRect.RotatedRect ( Point c,
Size s,
double a )

full constructor

Parameters
cThe rectangle mass center.
sWidth and height of the rectangle.
aThe rotation angle in a clockwise direction. When the angle is 0, 90, 180, 270 etc., the rectangle becomes an up-right rectangle.

◆ RotatedRect() [3/5]

OpenCVForUnity.CoreModule.RotatedRect.RotatedRect ( double[] vals)

◆ RotatedRect() [4/5]

OpenCVForUnity.CoreModule.RotatedRect.RotatedRect ( in Vec5d vals)

full constructor

Parameters
cThe rectangle mass center.
sWidth and height of the rectangle.
aThe rotation angle in a clockwise direction. When the angle is 0, 90, 180, 270 etc., the rectangle becomes an up-right rectangle.

◆ RotatedRect() [5/5]

OpenCVForUnity.CoreModule.RotatedRect.RotatedRect ( in(double x, double y, double width, double height, double angle) vals)

full constructor

Parameters
cThe rectangle mass center.
sWidth and height of the rectangle.
aThe rotation angle in a clockwise direction. When the angle is 0, 90, 180, 270 etc., the rectangle becomes an up-right rectangle.

Member Function Documentation

◆ boundingRect()

Rect OpenCVForUnity.CoreModule.RotatedRect.boundingRect ( )

returns the minimal up-right integer rectangle containing the rotated rectangle

◆ boundingRectAsValueTuple()

int int int int height OpenCVForUnity.CoreModule.RotatedRect.boundingRectAsValueTuple ( )

◆ boundingRectAsVec4i()

Vec4i OpenCVForUnity.CoreModule.RotatedRect.boundingRectAsVec4i ( )

returns the minimal up-right integer rectangle containing the rotated rectangle

◆ clone()

RotatedRect OpenCVForUnity.CoreModule.RotatedRect.clone ( )

◆ cloneAsValueTuple()

double double double double double angle OpenCVForUnity.CoreModule.RotatedRect.cloneAsValueTuple ( )

◆ cloneAsVec5d()

Vec5d OpenCVForUnity.CoreModule.RotatedRect.cloneAsVec5d ( )

◆ Equals() [1/2]

override bool OpenCVForUnity.CoreModule.RotatedRect.Equals ( Object obj)

◆ Equals() [2/2]

bool OpenCVForUnity.CoreModule.RotatedRect.Equals ( RotatedRect a)

◆ GetHashCode()

override int OpenCVForUnity.CoreModule.RotatedRect.GetHashCode ( )

◆ operator()

static OpenCVForUnity.CoreModule.RotatedRect.operator ( double x,
double y,
double width,
double height,
double angle )
explicitstatic

◆ operator RotatedRect()

static OpenCVForUnity.CoreModule.RotatedRect.operator RotatedRect ( in(double x, double y, double width, double height, double angle) valueTuple)
explicitstatic

◆ operator Vec5d()

◆ operator!=()

static bool OpenCVForUnity.CoreModule.RotatedRect.operator!= ( RotatedRect a,
RotatedRect b )
static

◆ operator==()

◆ points() [1/3]

void OpenCVForUnity.CoreModule.RotatedRect.points ( Point[] pt)

returns 4 vertices of the rotated rectangle

Parameters
ptThe points array for storing rectangle vertices. The order is bottomLeft, topLeft, topRight, bottomRight.

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.

◆ points() [2/3]

void OpenCVForUnity.CoreModule.RotatedRect.points ( ref Vec2d[] pt)

returns 4 vertices of the rotated rectangle

Parameters
ptThe points array for storing rectangle vertices. The order is bottomLeft, topLeft, topRight, bottomRight.

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.

◆ points() [3/3]

void OpenCVForUnity.CoreModule.RotatedRect.points ( ref(double x, double y)[] pt)

returns 4 vertices of the rotated rectangle

Parameters
ptThe points array for storing rectangle vertices. The order is bottomLeft, topLeft, topRight, bottomRight.

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.

◆ set() [1/3]

void OpenCVForUnity.CoreModule.RotatedRect.set ( double[] vals)

◆ set() [2/3]

void OpenCVForUnity.CoreModule.RotatedRect.set ( in Vec5d vals)

◆ set() [3/3]

void OpenCVForUnity.CoreModule.RotatedRect.set ( in(double x, double y, double width, double height, double angle) vals)

◆ ToString()

override string OpenCVForUnity.CoreModule.RotatedRect.ToString ( )

◆ ToValueTuple()

double double double double double angle OpenCVForUnity.CoreModule.RotatedRect.ToValueTuple ( )

◆ ToVec5d()

Vec5d OpenCVForUnity.CoreModule.RotatedRect.ToVec5d ( )

Member Data Documentation

◆ angle

double OpenCVForUnity.CoreModule.RotatedRect.angle

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

◆ center

Point OpenCVForUnity.CoreModule.RotatedRect.center

returns the rectangle mass center

◆ height

double double double double OpenCVForUnity.CoreModule.RotatedRect.height

◆ size

Size OpenCVForUnity.CoreModule.RotatedRect.size

returns width and height of the rectangle

◆ width [1/2]

double double double OpenCVForUnity.CoreModule.RotatedRect.width

◆ width [2/2]

double double double OpenCVForUnity.CoreModule.RotatedRect.width

◆ x [1/2]

double OpenCVForUnity.CoreModule.RotatedRect.x

returns the minimal up-right integer rectangle containing the rotated rectangle

◆ x [2/2]

double OpenCVForUnity.CoreModule.RotatedRect.x

◆ y [1/2]

double double OpenCVForUnity.CoreModule.RotatedRect.y

◆ y [2/2]

double double OpenCVForUnity.CoreModule.RotatedRect.y

The documentation for this class was generated from the following files: