#[non_exhaustive]pub struct LambdaTwist {
pub gauss_newton_iterations: usize,
pub rotation_convergence_iterations: usize,
pub rotation_convergence_epsilon: f64,
}
Expand description
The core P3P algorithm named Lambda Twist. Estimates up to 4 potential WorldToCamera
poses.
Returns 0 to 4 potential solutions to the equation:
are the 3D point world coordinates.
are the image coordinates
(also sometimes called “bearing vectors”).
are the signed distances from the camera.
This struct is marked as #[non_exhaustive]
to allow the backwards-compatible addition of new fields.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.gauss_newton_iterations: usize
This determines the number of iterations that Gauss-Newton is ran on the poses to optimize them. The paper notes that it rarely improves after two iterations. The original implementation uses 5 iterations.
rotation_convergence_iterations: usize
This determines the number of iterations to spend converging on a proper rotation matrix.
rotation_convergence_epsilon: f64
The epsilon on which convergence is considered achieved for converging on a proper rotation.
Implementations§
Source§impl LambdaTwist
impl LambdaTwist
Sourcepub fn gauss_newton_iterations(self, gauss_newton_iterations: usize) -> Self
pub fn gauss_newton_iterations(self, gauss_newton_iterations: usize) -> Self
Sets the LambdaTwist::gauss_newton_iterations
.
Sourcepub fn rotation_convergence_iterations(
self,
rotation_convergence_iterations: usize,
) -> Self
pub fn rotation_convergence_iterations( self, rotation_convergence_iterations: usize, ) -> Self
Sourcepub fn rotation_convergence_epsilon(
self,
rotation_convergence_epsilon: f64,
) -> Self
pub fn rotation_convergence_epsilon( self, rotation_convergence_epsilon: f64, ) -> Self
Trait Implementations§
Source§impl Clone for LambdaTwist
impl Clone for LambdaTwist
Source§fn clone(&self) -> LambdaTwist
fn clone(&self) -> LambdaTwist
Returns a copy 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 LambdaTwist
impl Debug for LambdaTwist
Source§impl Default for LambdaTwist
impl Default for LambdaTwist
Source§impl<P> Estimator<FeatureWorldMatch<P>> for LambdaTwistwhere
P: Bearing,
impl<P> Estimator<FeatureWorldMatch<P>> for LambdaTwistwhere
P: Bearing,
Source§const MIN_SAMPLES: usize = 3usize
const MIN_SAMPLES: usize = 3usize
The minimum number of samples that the estimator can estimate a model from.
Source§type Model = WorldToCamera
type Model = WorldToCamera
Model
is the model which is estimated from the underlying dataSource§impl PartialEq for LambdaTwist
impl PartialEq for LambdaTwist
impl Copy for LambdaTwist
impl StructuralPartialEq for LambdaTwist
Auto Trait Implementations§
impl Freeze for LambdaTwist
impl RefUnwindSafe for LambdaTwist
impl Send for LambdaTwist
impl Sync for LambdaTwist
impl Unpin for LambdaTwist
impl UnwindSafe for LambdaTwist
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<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.