OpenCV  3.2.0
Open Source Computer Vision
Public Member Functions | Static Public Member Functions | List of all members
cv::viz::Camera Class Reference

This class wraps intrinsic parameters of a camera. More...

#include "types.hpp"

Public Member Functions

 Camera (double fx, double fy, double cx, double cy, const Size &window_size)
 Constructs a Camera. More...
 
 Camera (const Vec2d &fov, const Size &window_size)
 
 Camera (const Matx33d &K, const Size &window_size)
 
 Camera (const Matx44d &proj, const Size &window_size)
 
void computeProjectionMatrix (Matx44d &proj) const
 Computes projection matrix using intrinsic parameters of the camera. More...
 
const Vec2d & getClip () const
 
const Vec2d & getFocalLength () const
 
const Vec2d & getFov () const
 
const Vec2d & getPrincipalPoint () const
 
const Size & getWindowSize () const
 
void setClip (const Vec2d &clip)
 
void setFov (const Vec2d &fov)
 
void setWindowSize (const Size &window_size)
 

Static Public Member Functions

static Camera KinectCamera (const Size &window_size)
 Creates a Kinect Camera. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ Camera() [1/4]

cv::viz::Camera::Camera ( double  fx,
double  fy,
double  cx,
double  cy,
const Size &  window_size 
)

Constructs a Camera.

Parameters
fxHorizontal focal length.
fyVertical focal length.
cxx coordinate of the principal point.
cyy coordinate of the principal point.
window_sizeSize of the window. This together with focal length and principal point determines the field of view.

◆ Camera() [2/4]

cv::viz::Camera::Camera ( const Vec2d &  fov,
const Size &  window_size 
)
explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
fovField of view (horizontal, vertical)
window_sizeSize of the window. Principal point is at the center of the window by default.

◆ Camera() [3/4]

cv::viz::Camera::Camera ( const Matx33d &  K,
const Size &  window_size 
)
explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
KIntrinsic matrix of the camera.
window_sizeSize of the window. This together with intrinsic matrix determines the field of view.

◆ Camera() [4/4]

cv::viz::Camera::Camera ( const Matx44d &  proj,
const Size &  window_size 
)
explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
projProjection matrix of the camera.
window_sizeSize of the window. This together with projection matrix determines the field of view.

Member Function Documentation

◆ computeProjectionMatrix()

void cv::viz::Camera::computeProjectionMatrix ( Matx44d &  proj) const

Computes projection matrix using intrinsic parameters of the camera.

Parameters
projOutput projection matrix.

◆ getClip()

const Vec2d& cv::viz::Camera::getClip ( ) const

◆ getFocalLength()

const Vec2d& cv::viz::Camera::getFocalLength ( ) const

◆ getFov()

const Vec2d& cv::viz::Camera::getFov ( ) const

◆ getPrincipalPoint()

const Vec2d& cv::viz::Camera::getPrincipalPoint ( ) const

◆ getWindowSize()

const Size& cv::viz::Camera::getWindowSize ( ) const

◆ KinectCamera()

static Camera cv::viz::Camera::KinectCamera ( const Size &  window_size)
static

Creates a Kinect Camera.

Parameters
window_sizeSize of the window. This together with intrinsic matrix of a Kinect Camera determines the field of view.

◆ setClip()

void cv::viz::Camera::setClip ( const Vec2d &  clip)

◆ setFov()

void cv::viz::Camera::setFov ( const Vec2d &  fov)

◆ setWindowSize()

void cv::viz::Camera::setWindowSize ( const Size &  window_size)

The documentation for this class was generated from the following file: