OpenCV  3.0.0-rc1
Open Source Computer Vision
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 Vec2dgetClip () const
 
const Vec2dgetFocalLength () const
 
const Vec2dgetFov () const
 
const Vec2dgetPrincipalPoint () const
 
const SizegetWindowSize () 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

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

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

Computes projection matrix using intrinsic parameters of the camera.

Parameters
projOutput projection matrix.
const Vec2d& cv::viz::Camera::getClip ( ) const
inline
const Vec2d& cv::viz::Camera::getFocalLength ( ) const
inline
const Vec2d& cv::viz::Camera::getFov ( ) const
inline
const Vec2d& cv::viz::Camera::getPrincipalPoint ( ) const
inline
const Size& cv::viz::Camera::getWindowSize ( ) const
inline
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.
void cv::viz::Camera::setClip ( const Vec2d clip)
inline
void cv::viz::Camera::setFov ( const Vec2d fov)
inline
void cv::viz::Camera::setWindowSize ( const Size window_size)

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