[−][src]Struct cv::Rect
The Rect
defines a rectangle in integer.
Fields
x: i32
x coordinate of the left-top corner
y: i32
y coordinate of the left-top corner
width: i32
width of this rectangle
height: i32
height of this rectangle
Methods
impl Rect
[src]
pub fn new(x: i32, y: i32, width: i32, height: i32) -> 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 PartialEq<Rect> for Rect
[src]
impl Default for Rect
[src]
impl Clone for Rect
[src]
fn clone(&self) -> Rect
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Rect
[src]
impl Copy for Rect
[src]
impl Debug for Rect
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,