Public Member Functions | Protected Attributes
vpgl_calibration_matrix< T > Class Template Reference

A class representing the "K" matrix of a perspective camera matrix as described in. More...

#include <vpgl_calibration_matrix.h>

Inheritance diagram for vpgl_calibration_matrix< T >:
Inheritance graph
[legend]

List of all members.

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)
focal_length () const
vgl_point_2d< T > principal_point () const
x_scale () const
y_scale () const
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

focal_length_
 The following is a list of the parameters in the calibration matrix.
vgl_point_2d< T > principal_point_
x_scale_
y_scale_
skew_

Detailed Description

template<class T>
class vpgl_calibration_matrix< T >

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.


Constructor & Destructor Documentation

template<class T >
vpgl_calibration_matrix< T >::vpgl_calibration_matrix ( )

Default constructor makes an identity matrix.

Definition at line 18 of file vpgl_calibration_matrix.txx.

template<class T>
virtual vpgl_calibration_matrix< T >::~vpgl_calibration_matrix ( ) [inline, virtual]

Destructor.

Definition at line 35 of file vpgl_calibration_matrix.h.

template<class T>
vpgl_calibration_matrix< T >::vpgl_calibration_matrix ( focal_length,
const vgl_point_2d< T > &  principal_point,
x_scale = (T)1,
y_scale = (T)1,
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.

template<class T>
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.


Member Function Documentation

template<class T>
T vpgl_calibration_matrix< T >::focal_length ( ) const [inline]

Definition at line 56 of file vpgl_calibration_matrix.h.

template<class T >
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.

template<class T>
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.

template<class T>
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.

template<class T>
bool vpgl_calibration_matrix< T >::operator!= ( vpgl_calibration_matrix< T > const &  that) const [inline]

Definition at line 64 of file vpgl_calibration_matrix.h.

template<class T>
bool vpgl_calibration_matrix< T >::operator== ( vpgl_calibration_matrix< T > const &  that) const

Equality tests.

Equality test.

Definition at line 127 of file vpgl_calibration_matrix.txx.

template<class T>
vgl_point_2d<T> vpgl_calibration_matrix< T >::principal_point ( ) const [inline]

Definition at line 57 of file vpgl_calibration_matrix.h.

template<class T>
void vpgl_calibration_matrix< T >::set_focal_length ( new_focal_length)

Getters and setters for all of the parameters.

Definition at line 83 of file vpgl_calibration_matrix.txx.

template<class T>
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.

template<class T>
void vpgl_calibration_matrix< T >::set_skew ( new_skew)

Definition at line 120 of file vpgl_calibration_matrix.txx.

template<class T>
void vpgl_calibration_matrix< T >::set_x_scale ( new_x_scale)

Definition at line 102 of file vpgl_calibration_matrix.txx.

template<class T>
void vpgl_calibration_matrix< T >::set_y_scale ( new_y_scale)

Definition at line 111 of file vpgl_calibration_matrix.txx.

template<class T>
T vpgl_calibration_matrix< T >::skew ( ) const [inline]

Definition at line 60 of file vpgl_calibration_matrix.h.

template<class T>
T vpgl_calibration_matrix< T >::x_scale ( ) const [inline]

Definition at line 58 of file vpgl_calibration_matrix.h.

template<class T>
T vpgl_calibration_matrix< T >::y_scale ( ) const [inline]

Definition at line 59 of file vpgl_calibration_matrix.h.


Member Data Documentation

template<class T>
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.

template<class T>
vgl_point_2d<T> vpgl_calibration_matrix< T >::principal_point_ [protected]

Definition at line 75 of file vpgl_calibration_matrix.h.

template<class T>
T vpgl_calibration_matrix< T >::skew_ [protected]

Definition at line 76 of file vpgl_calibration_matrix.h.

template<class T>
T vpgl_calibration_matrix< T >::x_scale_ [protected]

Definition at line 76 of file vpgl_calibration_matrix.h.

template<class T>
T vpgl_calibration_matrix< T >::y_scale_ [protected]

Definition at line 76 of file vpgl_calibration_matrix.h.


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