Calibration

Struct Calibration 

Source
pub struct Calibration<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Calibration<'a>

Source

pub fn from_raw( factory: &'a Factory, raw_calibration: &Vec<u8>, target_depth_mode: DepthMode, target_color_resolution: ColorResolution, ) -> Result<Calibration<'a>, Error>

👎Deprecated since 0.2: Factory::calibration_get_from_raw
Source

pub fn convert_3d_to_3d( &self, source_point3d: &Float3, source_camera: CalibrationType, target_camera: CalibrationType, ) -> Result<Float3, Error>

Transform a 3d point of a source coordinate system into a 3d point of the target coordinate system.

Source

pub fn convert_2d_to_3d( &self, source_point2d: &Float2, source_depth: f32, source_camera: CalibrationType, target_camera: CalibrationType, ) -> Result<(Float3, bool), Error>

Transform a 2d pixel coordinate with an associated depth value of the source camera into a 3d point of the target coordinate system. Returns false if the point is invalid in the target coordinate system (and therefore target_point3d should not be used)

Source

pub fn convert_3d_to_2d( &self, source_point3d: &Float3, source_camera: CalibrationType, target_camera: CalibrationType, ) -> Result<(Float2, bool), Error>

Transform a 3d point of a source coordinate system into a 2d pixel coordinate of the target camera. Returns false if the point is invalid in the target coordinate system (and therefore target_point2d should not be used)

Source

pub fn convert_2d_to_2d( &self, source_point2d: &Float2, source_depth: f32, source_camera: CalibrationType, target_camera: CalibrationType, ) -> Result<(Float2, bool), Error>

Transform a 2d pixel coordinate with an associated depth value of the source camera into a 2d pixel coordinate of the target camera Returns false if the point is invalid in the target coordinate system (and therefore target_point2d should not be used)

Source

pub fn convert_color_2d_to_depth_2d( &self, source_point2d: &Float2, depth_image: &Image<'_>, ) -> Result<(Float2, bool), Error>

Transform a 2D pixel coordinate from color camera into a 2D pixel coordinate of the depth camera. This function searches along an epipolar line in the depth image to find the corresponding depth pixel. Returns false if the point is invalid in the target coordinate system (and therefore target_point2d should not be used)

Auto Trait Implementations§

§

impl<'a> Freeze for Calibration<'a>

§

impl<'a> RefUnwindSafe for Calibration<'a>

§

impl<'a> !Send for Calibration<'a>

§

impl<'a> !Sync for Calibration<'a>

§

impl<'a> Unpin for Calibration<'a>

§

impl<'a> UnwindSafe for Calibration<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.