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,
},
}Expand description
Lens distortion models.
This enum captures all supported distortion models with their parameters.
Variants§
None
Perfect pinhole (no distortion)
Radial
BAL-style radial distortion (2 parameters: k1, k2)
Used in Bundle Adjustment in the Large datasets.
BrownConrady
Brown-Conrady / OpenCV model (5 parameters)
Standard model used in OpenCV: k1, k2, k3 (radial), p1, p2 (tangential)
KannalaBrandt
Kannala-Brandt fisheye model (4 parameters)
Polynomial distortion model for fisheye lenses.
FOV
Field-of-View model (1 parameter)
Single-parameter fisheye model based on field of view.
UCM
Unified Camera Model (1 parameter)
Single-viewpoint catadioptric camera model.
EUCM
Extended Unified Camera Model (2 parameters)
Extension of UCM with improved accuracy.
DoubleSphere
Double Sphere model (2 parameters)
Two-parameter fisheye model with improved wide-angle accuracy.
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DistortionModel
impl Debug for DistortionModel
Source§impl PartialEq for DistortionModel
impl PartialEq for DistortionModel
impl Copy 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable 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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.