OpenCV
4.0.0
Open Source Computer Vision
|
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 with. More... | |
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. :
cv::viz::Camera::Camera | ( | double | fx, |
double | fy, | ||
double | cx, | ||
double | cy, | ||
const Size & | window_size | ||
) |
Constructs a Camera.
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. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
fov | Field of view (horizontal, vertical) |
window_size | Size of the window. Principal point is at the center of the window by default. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
K | Intrinsic matrix of the camera with the following form \[ \begin{bmatrix} f_x & 0 & c_x\\ 0 & f_y & c_y\\ 0 & 0 & 1\\ \end{bmatrix} \] |
window_size | Size of the window. This together with intrinsic matrix determines the field of view. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
proj | Projection matrix of the camera with the following form \[ \begin{bmatrix} \frac{2n}{r-l} & 0 & \frac{r+l}{r-l} & 0\\ 0 & \frac{2n}{t-b} & \frac{t+b}{t-b} & 0\\ 0 & 0 & -\frac{f+n}{f-n} & -\frac{2fn}{f-n}\\ 0 & 0 & -1 & 0\\ \end{bmatrix} \] |
window_size | Size of the window. This together with projection matrix determines the field of view. |
void cv::viz::Camera::computeProjectionMatrix | ( | Matx44d & | proj | ) | const |
Computes projection matrix using intrinsic parameters of the camera.
proj | Output projection matrix with the following form \[ \begin{bmatrix} \frac{2n}{r-l} & 0 & \frac{r+l}{r-l} & 0\\ 0 & \frac{2n}{t-b} & \frac{t+b}{t-b} & 0\\ 0 & 0 & -\frac{f+n}{f-n} & -\frac{2fn}{f-n}\\ 0 & 0 & -1 & 0\\ \end{bmatrix} \] |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void cv::viz::Camera::setWindowSize | ( | const Size & | window_size | ) |