[−][src]Struct cv::estimate::LambdaTwist
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)
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() -> LambdaTwist
[src]
Creates a default lambda twist with 5 iterations of Gauss-Newton.
pub fn gauss_newton_iterations(
self,
gauss_newton_iterations: usize
) -> LambdaTwist
[src]
self,
gauss_newton_iterations: usize
) -> LambdaTwist
Sets the LambdaTwist::gauss_newton_iterations
.
pub fn rotation_convergence_iterations(
self,
rotation_convergence_iterations: usize
) -> LambdaTwist
[src]
self,
rotation_convergence_iterations: usize
) -> LambdaTwist
pub fn rotation_convergence_epsilon(
self,
rotation_convergence_epsilon: f64
) -> LambdaTwist
[src]
self,
rotation_convergence_epsilon: f64
) -> LambdaTwist
Trait Implementations
impl Clone for LambdaTwist
[src]
fn clone(&self) -> LambdaTwist
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for LambdaTwist
[src]
impl Debug for LambdaTwist
[src]
impl Default for LambdaTwist
[src]
fn default() -> LambdaTwist
[src]
impl<P> Estimator<FeatureWorldMatch<P>> for LambdaTwist where
P: Bearing,
[src]
P: Bearing,
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.
const MIN_SAMPLES: usize
[src]
fn estimate<I>(
&self,
data: I
) -> <LambdaTwist as Estimator<FeatureWorldMatch<P>>>::ModelIter where
I: Iterator<Item = FeatureWorldMatch<P>> + Clone,
[src]
&self,
data: I
) -> <LambdaTwist as Estimator<FeatureWorldMatch<P>>>::ModelIter where
I: Iterator<Item = FeatureWorldMatch<P>> + Clone,
impl PartialEq<LambdaTwist> for LambdaTwist
[src]
fn eq(&self, other: &LambdaTwist) -> bool
[src]
fn ne(&self, other: &LambdaTwist) -> bool
[src]
impl StructuralPartialEq for LambdaTwist
[src]
Auto Trait Implementations
impl RefUnwindSafe for LambdaTwist
impl Send for LambdaTwist
impl Sync for LambdaTwist
impl Unpin for LambdaTwist
impl UnwindSafe for LambdaTwist
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
T: PartialEq<T> + Copy + Any + Debug,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,