pub struct LensDistortionParams {
pub k1: f64,
pub k2: f64,
pub k3: f64,
pub p1: f64,
pub p2: f64,
pub cx: f64,
pub cy: f64,
pub fx: f64,
pub fy: f64,
}Expand description
Brown-Conrady radial and tangential lens distortion parameters.
These describe the distortion of a physical lens. Negative radial coefficients model barrel distortion; positive values model pincushion.
Fields§
§k1: f64Radial distortion coefficient k1.
k2: f64Radial distortion coefficient k2.
k3: f64Radial distortion coefficient k3.
p1: f64Tangential distortion coefficient p1.
p2: f64Tangential distortion coefficient p2.
cx: f64Principal point x (normalised, typically 0.5).
cy: f64Principal point y (normalised, typically 0.5).
fx: f64Focal length x (normalised, typically ~1.0 for a 90° FOV).
fy: f64Focal length y (normalised).
Implementations§
Source§impl LensDistortionParams
impl LensDistortionParams
Sourcepub fn barrel() -> Self
pub fn barrel() -> Self
Create parameters modelling mild barrel distortion (typical wide-angle lens).
Sourcepub fn pincushion() -> Self
pub fn pincushion() -> Self
Create parameters modelling mild pincushion distortion (typical telephoto).
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LensDistortionParams
Source§impl Debug for LensDistortionParams
impl Debug 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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