[−][src]Struct opencv::core::RotatedRect
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.
The sample below demonstrates how to use RotatedRect: RotatedRect_demo
See also
CamShift, fitEllipse, minAreaRect, CvBox2D
Implementations
impl RotatedRect
[src]
pub fn as_raw_RotatedRect(&self) -> *const c_void
[src]
pub fn as_raw_mut_RotatedRect(&mut self) -> *mut c_void
[src]
impl RotatedRect
[src]
pub fn default() -> Result<RotatedRect>
[src]
default constructor
pub fn new(center: Point2f, size: Size2f, angle: f32) -> Result<RotatedRect>
[src]
full constructor
Parameters
- 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.
pub fn for_points(
point1: Point2f,
point2: Point2f,
point3: Point2f
) -> Result<RotatedRect>
[src]
point1: Point2f,
point2: Point2f,
point3: Point2f
) -> Result<RotatedRect>
Any 3 end points of the RotatedRect. They must be given in order (either clockwise or anticlockwise).
Trait Implementations
impl Boxed for RotatedRect
[src]
unsafe fn from_raw(ptr: *mut c_void) -> Self
[src]
fn into_raw(self) -> *mut c_void
[src]
fn as_raw(&self) -> *const c_void
[src]
fn as_raw_mut(&mut self) -> *mut c_void
[src]
impl Debug for RotatedRect
[src]
impl Drop for RotatedRect
[src]
impl RotatedRectTrait for RotatedRect
[src]
fn as_raw_RotatedRect(&self) -> *const c_void
[src]
fn as_raw_mut_RotatedRect(&mut self) -> *mut c_void
[src]
fn center(&self) -> Point2f
[src]
fn set_center(&mut self, val: Point2f)
[src]
fn size(&self) -> Size2f
[src]
fn set_size(&mut self, val: Size2f)
[src]
fn angle(&self) -> f32
[src]
fn set_angle(&mut self, val: f32)
[src]
fn points(&self, pts: &mut [Point2f]) -> Result<()>
[src]
fn bounding_rect(&self) -> Result<Rect>
[src]
fn bounding_rect2f(&self) -> Result<Rect_<f32>>
[src]
impl Send for RotatedRect
[src]
impl VectorElement for RotatedRect where
Vector<RotatedRect>: VectorExtern<RotatedRect>,
[src]
Vector<RotatedRect>: VectorExtern<RotatedRect>,
fn opencv_vector_to_vec(v: &Vector<RotatedRect>) -> Vec<RotatedRect>
[src]
Auto Trait Implementations
impl RefUnwindSafe for RotatedRect
[src]
impl !Sync for RotatedRect
[src]
impl Unpin for RotatedRect
[src]
impl UnwindSafe for RotatedRect
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,