[][src]Struct cam_geom::PerspectiveParams

pub struct PerspectiveParams<R: RealField> {
    pub fx: R,
    pub fy: R,
    pub skew: R,
    pub cx: R,
    pub cy: R,
}

Parameters defining a pinhole perspective camera model.

These will be used to make the 3x4 intrinsic parameter matrix

[[fx, skew, cx, 0],
 [ 0,   fy, cy, 0],
 [ 0,    0,  1, 0]]

These parameters describe the intrinsic parameters, the transformation from camera coordinates to pixel coordinates, for a perspective camera model. For a full transformation from world coordinates to pixel coordinates, use a Camera, which can be constructed with these intinsic parameters and extrinsic parameters.

Read more about the pinhole perspective projection.

Can be converted into IntrinsicParametersPerspective via the .into() method like so:

use cam_geom::*;
let params = PerspectiveParams {
    fx: 100.0,
    fy: 100.0,
    skew: 0.0,
    cx: 640.0,
    cy: 480.0,
};
let intrinsics: IntrinsicParametersPerspective<_> = params.into();

Fields

fx: R

Horizontal focal length.

fy: R

Vertical focal length.

skew: R

Skew between horizontal and vertical axes.

cx: R

Horizontal component of the principal point.

cy: R

Vertical component of the principal point.

Trait Implementations

impl<R: Clone + RealField> Clone for PerspectiveParams<R>[src]

impl<R: Debug + RealField> Debug for PerspectiveParams<R>[src]

impl<'de, R: RealField> Deserialize<'de> for PerspectiveParams<R> where
    R: Deserialize<'de>, 
[src]

impl<R: RealField> From<PerspectiveParams<R>> for IntrinsicParametersPerspective<R>[src]

impl<R: PartialEq + RealField> PartialEq<PerspectiveParams<R>> for PerspectiveParams<R>[src]

impl<R: RealField> Serialize for PerspectiveParams<R> where
    R: Serialize
[src]

impl<R: RealField> StructuralPartialEq for PerspectiveParams<R>[src]

Auto Trait Implementations

impl<R> RefUnwindSafe for PerspectiveParams<R> where
    R: RefUnwindSafe

impl<R> Send for PerspectiveParams<R>

impl<R> Sync for PerspectiveParams<R>

impl<R> Unpin for PerspectiveParams<R> where
    R: Unpin

impl<R> UnwindSafe for PerspectiveParams<R> where
    R: UnwindSafe

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[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<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>,