A class representing the "K" matrix of a perspective camera matrix as described in. More...
#include <vpgl_calibration_matrix.h>
Public Member Functions | |
vpgl_calibration_matrix () | |
Default constructor makes an identity matrix. | |
virtual | ~vpgl_calibration_matrix () |
Destructor. | |
vpgl_calibration_matrix (T focal_length, const vgl_point_2d< T > &principal_point, T x_scale=(T) 1, T y_scale=(T) 1, T skew=(T) 0) | |
Construct using all of the camera parameters. | |
vpgl_calibration_matrix (const vnl_matrix_fixed< T, 3, 3 > &K) | |
Construct from a right upper triangular matrix whose decomposition into the calibration components makes sense. | |
vnl_matrix_fixed< T, 3, 3 > | get_matrix () const |
Get the calibration matrix. | |
void | set_focal_length (T new_focal_length) |
Getters and setters for all of the parameters. | |
void | set_principal_point (const vgl_point_2d< T > &new_principal_point) |
void | set_x_scale (T new_x_scale) |
void | set_y_scale (T new_y_scale) |
void | set_skew (T new_skew) |
T | focal_length () const |
vgl_point_2d< T > | principal_point () const |
T | x_scale () const |
T | y_scale () const |
T | skew () const |
bool | operator== (vpgl_calibration_matrix< T > const &that) const |
Equality tests. | |
bool | operator!= (vpgl_calibration_matrix< T > const &that) const |
vgl_point_2d< T > | map_to_focal_plane (vgl_point_2d< T > const &p_image) const |
Maps to and from the focal plane. | |
vgl_point_2d< T > | map_to_image (vgl_point_2d< T > const &p_focal_plane) const |
Protected Attributes | |
T | focal_length_ |
The following is a list of the parameters in the calibration matrix. | |
vgl_point_2d< T > | principal_point_ |
T | x_scale_ |
T | y_scale_ |
T | skew_ |
A class representing the "K" matrix of a perspective camera matrix as described in.
Hartley and Zisserman, "Multiple View Geometry".
Definition at line 28 of file vpgl_calibration_matrix.h.
vpgl_calibration_matrix< T >::vpgl_calibration_matrix | ( | ) |
Default constructor makes an identity matrix.
Definition at line 18 of file vpgl_calibration_matrix.txx.
virtual vpgl_calibration_matrix< T >::~vpgl_calibration_matrix | ( | ) | [inline, virtual] |
Destructor.
Definition at line 35 of file vpgl_calibration_matrix.h.
vpgl_calibration_matrix< T >::vpgl_calibration_matrix | ( | T | focal_length, |
const vgl_point_2d< T > & | principal_point, | ||
T | x_scale = (T)1 , |
||
T | y_scale = (T)1 , |
||
T | skew = (T)0 |
||
) |
Construct using all of the camera parameters.
Must satisfy the following requirements: x,y_scales must be > 0, focal_length must be not equal to 0.
Definition at line 30 of file vpgl_calibration_matrix.txx.
vpgl_calibration_matrix< T >::vpgl_calibration_matrix | ( | const vnl_matrix_fixed< T, 3, 3 > & | K | ) |
Construct from a right upper triangular matrix whose decomposition into the calibration components makes sense.
The supplied matrix can be a scalar multiple of such a matrix.
Definition at line 47 of file vpgl_calibration_matrix.txx.
T vpgl_calibration_matrix< T >::focal_length | ( | ) | const [inline] |
Definition at line 56 of file vpgl_calibration_matrix.h.
vnl_matrix_fixed< T, 3, 3 > vpgl_calibration_matrix< T >::get_matrix | ( | ) | const |
Get the calibration matrix.
Definition at line 67 of file vpgl_calibration_matrix.txx.
vgl_point_2d< T > vpgl_calibration_matrix< T >::map_to_focal_plane | ( | vgl_point_2d< T > const & | p_image | ) | const |
Maps to and from the focal plane.
Map from image to focal plane.
(Later may need to cache the inverse for efficiency)
Definition at line 143 of file vpgl_calibration_matrix.txx.
vgl_point_2d< T > vpgl_calibration_matrix< T >::map_to_image | ( | vgl_point_2d< T > const & | p_focal_plane | ) | const |
Definition at line 153 of file vpgl_calibration_matrix.txx.
bool vpgl_calibration_matrix< T >::operator!= | ( | vpgl_calibration_matrix< T > const & | that | ) | const [inline] |
Definition at line 64 of file vpgl_calibration_matrix.h.
bool vpgl_calibration_matrix< T >::operator== | ( | vpgl_calibration_matrix< T > const & | that | ) | const |
vgl_point_2d<T> vpgl_calibration_matrix< T >::principal_point | ( | ) | const [inline] |
Definition at line 57 of file vpgl_calibration_matrix.h.
void vpgl_calibration_matrix< T >::set_focal_length | ( | T | new_focal_length | ) |
Getters and setters for all of the parameters.
Definition at line 83 of file vpgl_calibration_matrix.txx.
void vpgl_calibration_matrix< T >::set_principal_point | ( | const vgl_point_2d< T > & | new_principal_point | ) |
Definition at line 92 of file vpgl_calibration_matrix.txx.
void vpgl_calibration_matrix< T >::set_skew | ( | T | new_skew | ) |
Definition at line 120 of file vpgl_calibration_matrix.txx.
void vpgl_calibration_matrix< T >::set_x_scale | ( | T | new_x_scale | ) |
Definition at line 102 of file vpgl_calibration_matrix.txx.
void vpgl_calibration_matrix< T >::set_y_scale | ( | T | new_y_scale | ) |
Definition at line 111 of file vpgl_calibration_matrix.txx.
T vpgl_calibration_matrix< T >::skew | ( | ) | const [inline] |
Definition at line 60 of file vpgl_calibration_matrix.h.
T vpgl_calibration_matrix< T >::x_scale | ( | ) | const [inline] |
Definition at line 58 of file vpgl_calibration_matrix.h.
T vpgl_calibration_matrix< T >::y_scale | ( | ) | const [inline] |
Definition at line 59 of file vpgl_calibration_matrix.h.
T vpgl_calibration_matrix< T >::focal_length_ [protected] |
The following is a list of the parameters in the calibration matrix.
Definition at line 74 of file vpgl_calibration_matrix.h.
vgl_point_2d<T> vpgl_calibration_matrix< T >::principal_point_ [protected] |
Definition at line 75 of file vpgl_calibration_matrix.h.
T vpgl_calibration_matrix< T >::skew_ [protected] |
Definition at line 76 of file vpgl_calibration_matrix.h.
T vpgl_calibration_matrix< T >::x_scale_ [protected] |
Definition at line 76 of file vpgl_calibration_matrix.h.
T vpgl_calibration_matrix< T >::y_scale_ [protected] |
Definition at line 76 of file vpgl_calibration_matrix.h.