[][src]Struct cv_core::RelativeCameraPose

pub struct RelativeCameraPose(pub Isometry3<f64>);

This contains a relative pose, which is a pose that transforms the CameraPoint of one image into the corresponding CameraPoint of another image. This transforms the point from the camera space of camera A to camera B.

Camera space for a given camera is defined as thus:

  • Origin is the optical center
  • Positive z axis is forwards
  • Positive y axis is up
  • Positive x axis is right

Note that this is a left-handed coordinate space.

Methods

impl RelativeCameraPose[src]

pub fn transform(&self, CameraPoint: CameraPoint) -> CameraPoint[src]

The relative pose transforms the point in camera space from camera A to camera B.

pub fn essential_matrix(&self) -> EssentialMatrix[src]

Generates an essential matrix corresponding to this relative camera pose.

If a point a is transformed using RelativeCameraPose::transform into a point b, then the essential matrix returned by this method will give a residual of approximately 0.0 when you call essential.residual(&KeyPointsMatch(a.into(), b.into())).

See the documentation of EssentialMatrix for more information.

let pose = RelativeCameraPose(Isometry3::from_parts(
    Vector3::new(0.3, 0.4, 0.5).into(),
    UnitQuaternion::from_euler_angles(0.2, 0.3, 0.4),
));
let a = CameraPoint(Point3::new(0.5, 0.5, 3.0));
let b = pose.transform(a);
assert!(pose.essential_matrix().residual(&KeyPointsMatch(a.into(), b.into())) < 1e-6);

Trait Implementations

impl AsMut<Isometry<f64, U3, Unit<Quaternion<f64>>>> for RelativeCameraPose[src]

impl AsRef<Isometry<f64, U3, Unit<Quaternion<f64>>>> for RelativeCameraPose[src]

impl Clone for RelativeCameraPose[src]

impl Copy for RelativeCameraPose[src]

impl Debug for RelativeCameraPose[src]

impl Deref for RelativeCameraPose[src]

type Target = Isometry3<f64>

The resulting type after dereferencing.

impl DerefMut for RelativeCameraPose[src]

impl From<Isometry<f64, U3, Unit<Quaternion<f64>>>> for RelativeCameraPose[src]

impl From<RelativeCameraPose> for Isometry3<f64>[src]

impl PartialEq<RelativeCameraPose> for RelativeCameraPose[src]

impl StructuralPartialEq for RelativeCameraPose[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, 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>,