@Namespace(value="cv")
@NoOffset
public static class opencv_core.RotatedRect
extends org.bytedeco.javacpp.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 
\sa CamShift, fitEllipse, minAreaRect, CvBox2D
| Constructor and Description |
|---|
RotatedRect()
default constructor
|
RotatedRect(long size)
Native array allocator.
|
RotatedRect(opencv_core.Point2f point1,
opencv_core.Point2f point2,
opencv_core.Point2f point3)
Any 3 end points of the RotatedRect.
|
RotatedRect(opencv_core.Point2f center,
opencv_core.Size2f size,
float angle)
full constructor
|
RotatedRect(org.bytedeco.javacpp.Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
float |
angle()
returns the rotation angle.
|
opencv_core.RotatedRect |
angle(float angle) |
opencv_core.Rect |
boundingRect()
returns the minimal up-right integer rectangle containing the rotated rectangle
|
opencv_core.Rect2f |
boundingRect2f()
returns the minimal (exact) floating point rectangle containing the rotated rectangle, not intended for use with images
|
opencv_core.Point2f |
center()
returns the rectangle mass center
|
opencv_core.RotatedRect |
center(opencv_core.Point2f center) |
void |
points(opencv_core.Point2f pts)
returns 4 vertices of the rectangle
|
opencv_core.RotatedRect |
position(long position) |
opencv_core.Size2f |
size()
returns width and height of the rectangle
|
opencv_core.RotatedRect |
size(opencv_core.Size2f size) |
asBuffer, capacity, get, get, get, get, limit, put, put, put, putaddress, asByteBuffer, availablePhysicalBytes, calloc, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic RotatedRect(org.bytedeco.javacpp.Pointer p)
Pointer.Pointer(Pointer).public RotatedRect(long size)
Pointer.position(long).public RotatedRect()
public RotatedRect(@Const @ByRef
opencv_core.Point2f center,
@Const @ByRef
opencv_core.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(@Const @ByRef
opencv_core.Point2f point1,
@Const @ByRef
opencv_core.Point2f point2,
@Const @ByRef
opencv_core.Point2f point3)
public opencv_core.RotatedRect position(long position)
position in class org.bytedeco.javacpp.FloatPointerpublic void points(opencv_core.Point2f pts)
pts - The points array for storing rectangle vertices. The order is bottomLeft, topLeft, topRight, bottomRight.@ByVal public opencv_core.Rect boundingRect()
@ByVal public opencv_core.Rect2f boundingRect2f()
@ByRef public opencv_core.Point2f center()
public opencv_core.RotatedRect center(opencv_core.Point2f center)
@ByRef public opencv_core.Size2f size()
public opencv_core.RotatedRect size(opencv_core.Size2f size)
public float angle()
public opencv_core.RotatedRect angle(float angle)
Copyright © 2018. All rights reserved.