[][src]Struct lambda_twist::LambdaTwist

#[non_exhaustive]pub struct LambdaTwist {
    pub gauss_newton_iterations: usize,
    pub rotation_convergence_iterations: usize,
    pub rotation_convergence_epsilon: f64,
}

The core P3P algorithm named Lambda Twist. Estimates up to 4 potential WorldToCamera poses.

Returns 0 to 4 potential solutions to the equation:

Formula

  • x_i are the 3D point world coordinates.
  • y_i are the image coordinates Formula (also sometimes called "bearing vectors").
  • lambda_i 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)

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

impl LambdaTwist[src]

pub fn new() -> Self[src]

Creates a default lambda twist with 5 iterations of Gauss-Newton.

pub fn gauss_newton_iterations(self, gauss_newton_iterations: usize) -> Self[src]

pub fn rotation_convergence_iterations(
    self,
    rotation_convergence_iterations: usize
) -> Self
[src]

pub fn rotation_convergence_epsilon(
    self,
    rotation_convergence_epsilon: f64
) -> Self
[src]

Trait Implementations

impl Clone for LambdaTwist[src]

impl Copy for LambdaTwist[src]

impl Debug for LambdaTwist[src]

impl Default for LambdaTwist[src]

impl<P> Estimator<FeatureWorldMatch<P>> for LambdaTwist where
    P: Bearing
[src]

type Model = WorldToCamera

Model is the model which is estimated from the underlying data

type ModelIter = ArrayVec<[WorldToCamera; 4]>

Iterator over the models produced from the data.

impl PartialEq<LambdaTwist> for LambdaTwist[src]

impl StructuralPartialEq for LambdaTwist[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: PartialEq<T> + Copy + Any + Debug
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,