@Namespace(value="cv") @NoOffset @Properties(inherit=opencv_core.class) public class RotatedRect extends FloatPointer
Each rectangle is specified by the center point (mass center), length of each side (represented by #Size2f structure) and the rotation angle in degrees.
The sample below demonstrates how to use RotatedRect: \snippet snippets/core_various.cpp RotatedRect_demo 
CamShift, fitEllipse, minAreaRect, CvBox2DPointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
RotatedRect()
default constructor
|
RotatedRect(long size)
Native array allocator.
|
RotatedRect(Point2f point1,
Point2f point2,
Point2f point3)
Any 3 end points of the RotatedRect.
|
RotatedRect(Point2f center,
Size2f size,
float angle)
full constructor
|
RotatedRect(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
float |
angle()
returns the rotation angle.
|
RotatedRect |
angle(float setter) |
Rect |
boundingRect()
returns the minimal up-right integer rectangle containing the rotated rectangle
|
Rect2f |
boundingRect2f()
returns the minimal (exact) floating point rectangle containing the rotated rectangle, not intended for use with images
|
Point2f |
center()
returns the rectangle mass center
|
RotatedRect |
center(Point2f setter) |
void |
points(Point2f pts)
returns 4 vertices of the rectangle
|
RotatedRect |
position(long position) |
Size2f |
size()
returns width and height of the rectangle
|
RotatedRect |
size(Size2f setter) |
asBuffer, capacity, get, get, get, get, limit, put, put, put, put, sizeofaddress, asByteBuffer, availablePhysicalBytes, calloc, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, isNull, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic RotatedRect(Pointer p)
Pointer.Pointer(Pointer).public RotatedRect(long size)
Pointer.position(long).public RotatedRect()
public RotatedRect(@Const @ByRef Point2f center, @Const @ByRef Size2f size, float angle)
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.public RotatedRect position(long position)
position in class FloatPointerpublic void points(Point2f pts)
pts - The points array for storing rectangle vertices. The order is bottomLeft, topLeft, topRight, bottomRight.@ByVal public Rect boundingRect()
@ByVal public Rect2f boundingRect2f()
public RotatedRect center(Point2f setter)
public RotatedRect size(Size2f setter)
public float angle()
public RotatedRect angle(float setter)
Copyright © 2020. All rights reserved.