[−][src]Struct opencv::viz::Camera
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]
fx: f64,
fy: f64,
cx: f64,
cy: f64,
window_size: Size
) -> Result<Camera>
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
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,