Public Member Functions | Protected Attributes | List of all members
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]

Public Member Functions

 vpgl_calibration_matrix ()
 Default constructor makes an identity matrix. More...
 
virtual ~vpgl_calibration_matrix ()=default
 Destructor. More...
 
 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. More...
 
 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. More...
 
vnl_matrix_fixed< T, 3, 3 > get_matrix () const
 Get the calibration matrix. More...
 
void set_focal_length (T new_focal_length)
 Getters and setters for all of the parameters. More...
 
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. More...
 
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. More...
 
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. More...
 
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

◆ vpgl_calibration_matrix() [1/3]

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

Default constructor makes an identity matrix.

Definition at line 21 of file vpgl_calibration_matrix.hxx.

◆ ~vpgl_calibration_matrix()

template<class T>
virtual vpgl_calibration_matrix< T >::~vpgl_calibration_matrix ( )
virtualdefault

Destructor.

◆ vpgl_calibration_matrix() [2/3]

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 33 of file vpgl_calibration_matrix.hxx.

◆ vpgl_calibration_matrix() [3/3]

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 50 of file vpgl_calibration_matrix.hxx.

Member Function Documentation

◆ focal_length()

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

Definition at line 57 of file vpgl_calibration_matrix.h.

◆ get_matrix()

template<class T >
vnl_matrix_fixed< T, 3, 3 > vpgl_calibration_matrix< T >::get_matrix ( ) const

Get the calibration matrix.

Definition at line 70 of file vpgl_calibration_matrix.hxx.

◆ map_to_focal_plane()

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 146 of file vpgl_calibration_matrix.hxx.

◆ map_to_image()

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 156 of file vpgl_calibration_matrix.hxx.

◆ operator!=()

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.

◆ operator==()

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

Equality tests.

Equality test.

Definition at line 130 of file vpgl_calibration_matrix.hxx.

◆ principal_point()

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.

◆ set_focal_length()

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 86 of file vpgl_calibration_matrix.hxx.

◆ set_principal_point()

template<class T>
void vpgl_calibration_matrix< T >::set_principal_point ( const vgl_point_2d< T > &  new_principal_point)

Definition at line 95 of file vpgl_calibration_matrix.hxx.

◆ set_skew()

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

Definition at line 123 of file vpgl_calibration_matrix.hxx.

◆ set_x_scale()

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

Definition at line 105 of file vpgl_calibration_matrix.hxx.

◆ set_y_scale()

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

Definition at line 114 of file vpgl_calibration_matrix.hxx.

◆ skew()

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

Definition at line 61 of file vpgl_calibration_matrix.h.

◆ x_scale()

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

Definition at line 59 of file vpgl_calibration_matrix.h.

◆ y_scale()

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

◆ focal_length_

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 75 of file vpgl_calibration_matrix.h.

◆ principal_point_

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

Definition at line 76 of file vpgl_calibration_matrix.h.

◆ skew_

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

Definition at line 77 of file vpgl_calibration_matrix.h.

◆ x_scale_

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

Definition at line 77 of file vpgl_calibration_matrix.h.

◆ y_scale_

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

Definition at line 77 of file vpgl_calibration_matrix.h.


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