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
virtual void b_write (vsl_b_ostream &os) const
 Binary save self to stream.
virtual void b_read (vsl_b_istream &is)
 Binary load self from stream.
short version () const
 IO version number.

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 29 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 16 of file vpgl_calibration_matrix.txx.

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

Destructor.

Definition at line 36 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 28 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 45 of file vpgl_calibration_matrix.txx.


Member Function Documentation

template<class T >
void vpgl_calibration_matrix< T >::b_read ( vsl_b_istream is) [virtual]

Binary load self from stream.

Definition at line 167 of file vpgl_calibration_matrix.txx.

template<class T >
void vpgl_calibration_matrix< T >::b_write ( vsl_b_ostream os) const [virtual]

Binary save self to stream.

Remarks:
cached_svd_ not written

Definition at line 194 of file vpgl_calibration_matrix.txx.

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

Definition at line 57 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 65 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 svd for efficiency)

Definition at line 141 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 65 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 125 of file vpgl_calibration_matrix.txx.

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

Definition at line 58 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 81 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 90 of file vpgl_calibration_matrix.txx.

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

Definition at line 118 of file vpgl_calibration_matrix.txx.

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

Definition at line 100 of file vpgl_calibration_matrix.txx.

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

Definition at line 109 of file vpgl_calibration_matrix.txx.

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

Definition at line 61 of file vpgl_calibration_matrix.h.

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

IO version number.

Definition at line 82 of file vpgl_calibration_matrix.h.

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

Definition at line 59 of file vpgl_calibration_matrix.h.

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

Definition at line 60 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 86 of file vpgl_calibration_matrix.h.

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

Definition at line 87 of file vpgl_calibration_matrix.h.

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

Definition at line 88 of file vpgl_calibration_matrix.h.

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

Definition at line 88 of file vpgl_calibration_matrix.h.

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

Definition at line 88 of file vpgl_calibration_matrix.h.


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