pub enum DistortionModel {
None,
Radial {
k1: f64,
k2: f64,
},
BrownConrady {
k1: f64,
k2: f64,
p1: f64,
p2: f64,
k3: f64,
},
KannalaBrandt {
k1: f64,
k2: f64,
k3: f64,
k4: f64,
},
FOV {
w: f64,
},
UCM {
alpha: f64,
},
EUCM {
alpha: f64,
beta: f64,
},
DoubleSphere {
xi: f64,
alpha: f64,
},
FTheta {
k1: f64,
k2: f64,
k3: f64,
k4: f64,
},
}Expand description
Lens distortion models. The exact parameter ranges are enforced by
DistortionModel::validate.
Variants§
None
No distortion (vanilla pinhole).
Radial
BAL-style radial distortion (k1, k2).
BrownConrady
Brown-Conrady / OpenCV radial-tangential distortion.
KannalaBrandt
Kannala-Brandt polynomial fisheye.
FOV
Devernay-Faugeras field-of-view.
UCM
Geyer-Daniilidis unified camera model.
EUCM
Khomutenko extended UCM.
DoubleSphere
Usenko double-sphere.
FTheta
NVIDIA f-theta polynomial fisheye.
Implementations§
Source§impl DistortionModel
impl DistortionModel
Sourcepub fn validate(&self) -> Result<(), CameraModelError>
pub fn validate(&self) -> Result<(), CameraModelError>
Validate distortion parameters for the given model variant.
Trait Implementations§
Source§impl Clone for DistortionModel
impl Clone for DistortionModel
Source§fn clone(&self) -> DistortionModel
fn clone(&self) -> DistortionModel
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 DistortionModel
Source§impl Debug for DistortionModel
impl Debug for DistortionModel
Source§impl PartialEq for DistortionModel
impl PartialEq for DistortionModel
impl StructuralPartialEq for DistortionModel
Auto Trait Implementations§
impl Freeze for DistortionModel
impl RefUnwindSafe for DistortionModel
impl Send for DistortionModel
impl Sync for DistortionModel
impl Unpin for DistortionModel
impl UnsafeUnpin for DistortionModel
impl UnwindSafe for DistortionModel
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,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.