pub enum CameraModelKind {
SingleFocalPinhole = 0,
Pinhole = 1,
SingleFocalRadial = 2,
Radial = 3,
OpenCv = 4,
}Expand description
Supported camera models. The numeric id is the model number in the model file format.
Variants§
SingleFocalPinhole = 0
Single-focal pinhole (f, cx, cy).
Pinhole = 1
Pinhole (fx, fy, cx, cy).
SingleFocalRadial = 2
Single focal + 1 radial distortion term (f, cx, cy, k).
Radial = 3
Single focal + 2 radial distortion terms (f, cx, cy, k1, k2).
OpenCv = 4
2 radial terms + 2 tangential terms (fx, fy, cx, cy, k1, k2, p1, p2).
Implementations§
Source§impl CameraModelKind
impl CameraModelKind
Sourcepub fn num_params(self) -> usize
pub fn num_params(self) -> usize
Number of parameters.
Sourcepub fn params_info(self) -> &'static str
pub fn params_info(self) -> &'static str
Parameter names (comma-separated).
Sourcepub fn focal_slots(self) -> &'static [usize]
pub fn focal_slots(self) -> &'static [usize]
Position of the focal parameters within params.
Sourcepub fn pp_slots(self) -> &'static [usize]
pub fn pp_slots(self) -> &'static [usize]
Position of the principal point parameters within params.
Sourcepub fn extra_param_slots(self) -> &'static [usize]
pub fn extra_param_slots(self) -> &'static [usize]
Position of the distortion (extra) parameters within params.
Trait Implementations§
Source§impl Clone for CameraModelKind
impl Clone for CameraModelKind
impl Copy for CameraModelKind
Source§impl Debug for CameraModelKind
impl Debug for CameraModelKind
impl Eq for CameraModelKind
Source§impl Hash for CameraModelKind
impl Hash for CameraModelKind
Source§impl PartialEq for CameraModelKind
impl PartialEq for CameraModelKind
impl StructuralPartialEq for CameraModelKind
Auto Trait Implementations§
impl Freeze for CameraModelKind
impl RefUnwindSafe for CameraModelKind
impl Send for CameraModelKind
impl Sync for CameraModelKind
impl Unpin for CameraModelKind
impl UnsafeUnpin for CameraModelKind
impl UnwindSafe for CameraModelKind
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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.