[−][src]Struct cv_pinhole::PoseSolver
Allows pose solving to be parameterized if defaults are not sufficient.
Implementations
impl<'a> PoseSolver<'a>
[src]
pub fn epsilon(self, epsilon: f64) -> Self
[src]
Set the epsilon to be used in SVD.
pub fn max_iterations(self, max_iterations: usize) -> Self
[src]
Set the max number of iterations to be used in SVD.
pub fn consensus_ratio(self, consensus_ratio: f64) -> Self
[src]
Set the level of agreement required for the pose to be accepted.
pub fn solve_unscaled(
&self,
correspondences: impl Iterator<Item = FeatureMatch<NormalizedKeyPoint>>
) -> Option<CameraToCamera>
[src]
&self,
correspondences: impl Iterator<Item = FeatureMatch<NormalizedKeyPoint>>
) -> Option<CameraToCamera>
Return the CameraToCamera
that transforms a CameraPoint
of image
A (source of a
) to the corresponding CameraPoint
of image B (source of b
).
The function takes an iterator over FeatureMatch
from A to B.
The translation scale is unknown of the returned pose.
depth
- The actual depth (z
axis, not distance) of normalized keypointa
a
- A keypoint from imageA
b
- A keypoint from imageB
self
must satisfy the constraint:
transpose(homogeneous(a)) * E * homogeneous(b) = 0
Also, a
and b
must be a correspondence.
This will take the average translation over the entire iterator. This is done to smooth out noise and outliers (if present).
epsilon
is a small value to which SVD must converge to before terminating.
max_iterations
is the maximum number of iterations that SVD will run on this
matrix. Use this to cap the execution time.
A max_iterations
of 0
may execute indefinitely and is not recommended except
for non-production code.
consensus_ratio
is the ratio of points which must be in front of the camera for the model
to be accepted and return Some. Otherwise, None is returned. Set this to about
0.45
to have approximate majority consensus.
bearing_scale
is a function that is passed a translation bearing vector,
an untranslated (but rotated) camera point, and a normalized key point
where the actual point exists. It must return the scalar which the
translation bearing vector must by multiplied by to get the actual translation.
It may return None
if it fails.
correspondences
must provide an iterator of tuples containing the matches
of a 3d CameraPoint
a
from camera A and the matching NormalizedKeyPoint
b
from camera B.
This does not communicate which points were outliers to each model.
pub fn solve_unscaled_inliers(
&self,
correspondences: impl Iterator<Item = FeatureMatch<NormalizedKeyPoint>>
) -> Option<(CameraToCamera, Vec<usize>)>
[src]
&self,
correspondences: impl Iterator<Item = FeatureMatch<NormalizedKeyPoint>>
) -> Option<(CameraToCamera, Vec<usize>)>
Same as PoseSolver::solve_unscaled
, but also communicates the inliers.
The alloc
feature must be enabled to use this method.
Trait Implementations
impl<'a> Clone for PoseSolver<'a>
[src]
fn clone(&self) -> PoseSolver<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Copy for PoseSolver<'a>
[src]
impl<'a> Debug for PoseSolver<'a>
[src]
Auto Trait Implementations
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<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>,