pub struct LensDistortionParams {
pub k1: f64,
pub k2: f64,
pub k3: f64,
pub p1: f64,
pub p2: f64,
pub fx: f64,
pub fy: f64,
pub cx: f64,
pub cy: f64,
}Expand description
Parameters for radial + tangential lens distortion (Brown-Conrady model).
This is the same model used by OpenCV and is compatible with camera calibration output from standard photogrammetry tools.
Fields§
§k1: f64Radial distortion coefficient k₁ (typically small, e.g. -0.3 to +0.5).
k2: f64Radial distortion coefficient k₂.
k3: f64Radial distortion coefficient k₃.
p1: f64Tangential distortion coefficient p₁.
p2: f64Tangential distortion coefficient p₂.
fx: f64Focal length in pixels along the X axis.
fy: f64Focal length in pixels along the Y axis.
cx: f64Principal point X coordinate (typically width / 2).
cy: f64Principal point Y coordinate (typically height / 2).
Implementations§
Source§impl LensDistortionParams
impl LensDistortionParams
Sourcepub fn no_distortion(width: u32, height: u32) -> Self
pub fn no_distortion(width: u32, height: u32) -> Self
Create a default (no distortion) parameter set for an image of the
given width × height.
Trait Implementations§
Source§impl Clone for LensDistortionParams
impl Clone for LensDistortionParams
Source§fn clone(&self) -> LensDistortionParams
fn clone(&self) -> LensDistortionParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LensDistortionParams
impl Debug for LensDistortionParams
impl Copy for LensDistortionParams
Auto Trait Implementations§
impl Freeze for LensDistortionParams
impl RefUnwindSafe for LensDistortionParams
impl Send for LensDistortionParams
impl Sync for LensDistortionParams
impl Unpin for LensDistortionParams
impl UnsafeUnpin for LensDistortionParams
impl UnwindSafe for LensDistortionParams
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more