[][src]Struct opencv::viz::Camera

pub struct Camera { /* fields omitted */ }

This class wraps intrinsic parameters of a camera.

It provides several constructors that can extract the intrinsic parameters from field of view, intrinsic matrix and projection matrix. :

Methods

impl Camera[src]

pub fn as_raw_Camera(&self) -> *mut c_void[src]

pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self[src]

impl Camera[src]

pub fn new(
    fx: f64,
    fy: f64,
    cx: f64,
    cy: f64,
    window_size: Size
) -> Result<Camera>
[src]

Constructs a Camera.

Parameters

  • fx: Horizontal focal length.
  • fy: Vertical focal length.
  • cx: x coordinate of the principal point.
  • cy: y coordinate of the principal point.
  • window_size: Size of the window. This together with focal length and principal point determines the field of view.

pub fn new_1(fov: Vec2d, window_size: Size) -> Result<Camera>[src]

Parameters

  • fov: Field of view (horizontal, vertical)
  • window_size: Size of the window. Principal point is at the center of the window by default.

pub fn get_clip(&self) -> Result<Vec2d>[src]

pub fn set_clip(&mut self, clip: Vec2d) -> Result<()>[src]

pub fn get_window_size(&self) -> Result<Size>[src]

pub fn set_window_size(&mut self, window_size: Size) -> Result<()>[src]

pub fn get_fov(&self) -> Result<Vec2d>[src]

pub fn set_fov(&mut self, fov: Vec2d) -> Result<()>[src]

pub fn get_principal_point(&self) -> Result<Vec2d>[src]

pub fn get_focal_length(&self) -> Result<Vec2d>[src]

pub fn kinect_camera(window_size: Size) -> Result<Camera>[src]

Creates a Kinect Camera with

  • fx = fy = 525
  • cx = 320
  • cy = 240

Parameters

  • window_size: Size of the window. This together with intrinsic matrix of a Kinect Camera determines the field of view.

Trait Implementations

impl Drop for Camera[src]

impl Send for Camera[src]

Auto Trait Implementations

impl RefUnwindSafe for Camera

impl !Sync for Camera

impl Unpin for Camera

impl UnwindSafe for Camera

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, 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.