Struct cv::core::Rect [−][src]
The Rect defines a rectangle in integer.
Fields
x: c_intx coordinate of the left-top corner
y: c_inty coordinate of the left-top corner
width: c_intwidth of this rectangle
height: c_intheight of this rectangle
Implementations
impl Rect[src]
pub fn new(x: c_int, y: c_int, width: c_int, height: c_int) -> Self[src]
Creates a new Rect with (x, y, width, height) parameters.
pub fn scale(&self, ratio: f32) -> Rect[src]
Scales the rectangle by the specified ratio.
pub fn normalize_to_mat(&self, mat: &Mat) -> Rect2f[src]
Normalize the rectangle according to the image (if the rectangle is inside the image, then the result should be all within (0, 1).
Trait Implementations
impl Clone for Rect[src]
impl Copy for Rect[src]
impl Debug for Rect[src]
impl Default for Rect[src]
impl Eq for Rect[src]
impl PartialEq<Rect> for Rect[src]
impl StructuralEq for Rect[src]
impl StructuralPartialEq for Rect[src]
Auto Trait Implementations
impl RefUnwindSafe for Rect
impl Send for Rect
impl Sync for Rect
impl Unpin for Rect
impl UnwindSafe for Rect
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> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
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>,