[][src]Struct p3p::nordberg::Pose

pub struct Pose {
    pub rotation: [f32; 4],
    pub translation: [f32; 3],
}

Pose of a camera (almost) returned by the solve function. Beware that the result of the solve function isn't exactly the rotation and translation of the camera itself in world coordinates. It is the rotation and translation pair satisfying the equation: $$ \lambda_i \ \bm{y_i} = \bm{R \ x_i} + \bm{t},\quad i \in \{1, 2, 3\} $$

  • $\bm{x_i}$ are the 3D point world coordinates.
  • $\bm{y_i}$ are the image coordinates $\bm{y_i} \ \text{\textasciitilde} \ (u_i, v_i, 1)$ also sometimes called "bearing vectors".
  • $\lambda_i$ are the signed distances from the camera.

The rotation and pose of the camera itself can easily be retrieved knowing that:

$$ \begin{cases} \bm{R_{cam}} = \bm{R^T} \\ \bm{t_{cam}} = \bm{-R_{cam} \ t} \end{cases} $$

Fields

rotation: [f32; 4]

Rotation given as a unit quaternion of the form [x, y, z, w] where the real coefficient is the last one.

translation: [f32; 3]

Translation.

Trait Implementations

impl Clone for Pose[src]

impl Copy for Pose[src]

impl Debug for Pose[src]

Auto Trait Implementations

impl Send for Pose

impl Unpin for Pose

impl Sync for Pose

impl UnwindSafe for Pose

impl RefUnwindSafe for Pose

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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