Struct visioncortex::PerspectiveTransform
source · pub struct PerspectiveTransform { /* private fields */ }
Expand description
A perspective transform can easily be used to map one 2D quadrilateral to another, given the corner coordinates for the source and destination quadrilaterals.
Adapted from https://github.com/jlouthan/perspective-transform
Implementations§
source§impl PerspectiveTransform
impl PerspectiveTransform
pub fn from_point_f64(src_pts: &[PointF64; 4], dst_pts: &[PointF64; 4]) -> Self
pub fn new(src_pts: [f64; 8], dst_pts: [f64; 8]) -> PerspectiveTransform
pub fn default() -> PerspectiveTransform
pub fn transform(&self, point: PointF64) -> PointF64
pub fn transform_inverse(&self, point: PointF64) -> PointF64
pub fn print_coeffs(&self) -> String
Auto Trait Implementations§
impl Freeze for PerspectiveTransform
impl RefUnwindSafe for PerspectiveTransform
impl Send for PerspectiveTransform
impl Sync for PerspectiveTransform
impl Unpin for PerspectiveTransform
impl UnwindSafe for PerspectiveTransform
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more