Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Related Functions
vpgl_local_rational_camera< T > Class Template Reference

#include <vpgl_local_rational_camera.h>

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

List of all members.

Public Types

enum  coor_index {
  X_INDX = 0, Y_INDX, Z_INDX, U_INDX,
  V_INDX
}
 enumeration for indexing coordinates. More...
enum  poly_index { NEU_U = 0, DEN_U, NEU_V, DEN_V }
 enumeration for indexing polynomials. More...

Public Member Functions

 vpgl_local_rational_camera ()
 default constructor.
 vpgl_local_rational_camera (vpgl_lvcs const &lvcs, vpgl_rational_camera< T > const &rcam)
 Constructor from a rational camera and a lvcs.
 vpgl_local_rational_camera (T longitude, T latitude, T elevation, vpgl_rational_camera< T > const &rcam)
 Constructor from a rational camera and a geographic origin.
virtual ~vpgl_local_rational_camera ()
virtual vcl_string type_name () const
 class identity functions for casting.
virtual
vpgl_local_rational_camera< T > * 
clone (void) const
 Clone `this': creation of a new object and initialization.
bool operator== (vpgl_local_rational_camera< T > const &that) const
 Equality test.
void set_lvcs (vpgl_lvcs const &lvcs)
 set the local vertical coordinate system.
vpgl_lvcs lvcs () const
virtual void project (const T x, const T y, const T z, T &u, T &v) const
 The generic camera interface. u represents image column, v image row.
virtual vnl_vector_fixed< T, 2 > project (vnl_vector_fixed< T, 3 > const &world_point) const
 Project a world point onto the image.
virtual vgl_point_2d< T > project (vgl_point_3d< T > world_point) const
 Project a world point onto the image.
virtual void print (vcl_ostream &s=vcl_cout) const
 print the camera parameters.
virtual bool save (vcl_string cam_path)
 save to file (the lvcs is after the global rational camera parameters).
bool operator== (vpgl_rational_camera< T > const &that) const
 Equality test.
void set_coefficients (vcl_vector< vcl_vector< T > > const &rational_coeffs)
 set rational polynomial coefficients.
void set_coefficients (vnl_matrix_fixed< T, 4, 20 > const &rational_coeffs)
void set_scale_offsets (vcl_vector< vpgl_scale_offset< T > > const &scale_offsets)
 set coordinate scale and offsets.
vnl_matrix_fixed< T, 4, 20 > coefficient_matrix () const
 get the rational polynomial coefficients in a vnl matrix.
vcl_vector< vcl_vector< T > > coefficients () const
 get the rational polynomial coefficients in a vcl array.
vcl_vector< vpgl_scale_offset
< T > > 
scale_offsets () const
 get the scale and offsets in a vector.
void set_scale (const coor_index coor_index, const T scale)
 set a specific scale value.
void set_offset (const coor_index coor_index, const T offset)
 set a specific scale value.
scale (const coor_index coor_index) const
 get a specific scale value.
offset (const coor_index coor_index) const
 get a specific offset value.
vpgl_scale_offset< T > scl_off (const coor_index coor_index) const
 get a specific scale_offset.
void set_image_offset (const T u_off, const T v_off)
 set u-v translation offset.
void image_offset (T &u_off, T &v_off)
 get u-v translation offset.
void set_image_scale (const T u_scale, const T v_scale)
 set u-v scale.
void image_scale (T &u_scale, T &v_scale)
 get u-v scale.
vcl_string is_a () const
bool is_class (vcl_string const &name) const
void ref ()
void unref ()
int get_references () const
bool is_referenced () const

Protected Member Functions

vnl_vector_fixed< T, 20 > power_vector (const T x, const T y, const T z) const
 Create a vector with the standard order of monomial terms.

Protected Attributes

vpgl_lvcs lvcs_
vnl_matrix_fixed< T, 4, 20 > rational_coeffs_
vcl_vector< vpgl_scale_offset
< T > > 
scale_offsets_

Related Functions

(Note that these are not member functions.)

template<class T >
vpgl_local_rational_camera< T > * read_local_rational_camera (vcl_string cam_path)
 Creates a local rational camera from a file.
template<class T >
vpgl_local_rational_camera< T > * read_local_rational_camera (vcl_istream &istr)
 Creates a local rational camera from a file.
template<class T >
vcl_ostream & operator<< (vcl_ostream &s, const vpgl_local_rational_camera< T > &p)
 Write to stream.
template<class T >
vcl_istream & operator>> (vcl_istream &is, vpgl_local_rational_camera< T > &p)
 Read from stream.
template<class T >
vcl_ostream & operator<< (vcl_ostream &s, const vpgl_rational_camera< T > &p)
 Write to stream.
template<class T >
vcl_istream & operator>> (vcl_istream &is, vpgl_rational_camera< T > &p)
 Read from stream.
template<class T >
vpgl_rational_camera< T > * read_rational_camera (vcl_string cam_path)
 Creates a rational camera from a file.
template<class T >
vpgl_rational_camera< T > * read_rational_camera (vcl_istream &istr)
 Creates a rational camera from a stream.

Detailed Description

template<class T>
class vpgl_local_rational_camera< T >

Definition at line 25 of file vpgl_local_rational_camera.h.


Member Enumeration Documentation

template<class T>
enum vpgl_rational_camera::coor_index [inherited]

enumeration for indexing coordinates.

Enumerator:
X_INDX 
Y_INDX 
Z_INDX 
U_INDX 
V_INDX 

Definition at line 107 of file vpgl_rational_camera.h.

template<class T>
enum vpgl_rational_camera::poly_index [inherited]

enumeration for indexing polynomials.

Enumerator:
NEU_U 
DEN_U 
NEU_V 
DEN_V 

Definition at line 109 of file vpgl_rational_camera.h.


Constructor & Destructor Documentation

default constructor.

Definition at line 17 of file vpgl_local_rational_camera.txx.

template<class T >
vpgl_local_rational_camera< T >::vpgl_local_rational_camera ( vpgl_lvcs const &  lvcs,
vpgl_rational_camera< T > const &  rcam 
)

Constructor from a rational camera and a lvcs.

Constructor from a rational camera and an affine matrix.

Definition at line 25 of file vpgl_local_rational_camera.txx.

template<class T >
vpgl_local_rational_camera< T >::vpgl_local_rational_camera ( longitude,
latitude,
elevation,
vpgl_rational_camera< T > const &  rcam 
)

Constructor from a rational camera and a geographic origin.

Definition at line 35 of file vpgl_local_rational_camera.txx.

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

Definition at line 40 of file vpgl_local_rational_camera.h.


Member Function Documentation

template<class T >
vpgl_local_rational_camera< T > * vpgl_local_rational_camera< T >::clone ( void  ) const [virtual]

Clone `this': creation of a new object and initialization.

See Prototype pattern

Reimplemented from vpgl_rational_camera< T >.

Definition at line 45 of file vpgl_local_rational_camera.txx.

template<class T>
vnl_matrix_fixed<T, 4, 20> vpgl_rational_camera< T >::coefficient_matrix ( ) const [inline, inherited]

get the rational polynomial coefficients in a vnl matrix.

Definition at line 170 of file vpgl_rational_camera.h.

template<class T >
vcl_vector< vcl_vector< T > > vpgl_rational_camera< T >::coefficients ( ) const [inherited]

get the rational polynomial coefficients in a vcl array.

Definition at line 121 of file vpgl_rational_camera.txx.

template<class T>
void vpgl_rational_camera< T >::image_offset ( T &  u_off,
T &  v_off 
) [inline, inherited]

get u-v translation offset.

Definition at line 201 of file vpgl_rational_camera.h.

template<class T>
void vpgl_rational_camera< T >::image_scale ( T &  u_scale,
T &  v_scale 
) [inline, inherited]

get u-v scale.

Definition at line 210 of file vpgl_rational_camera.h.

template<class T>
vcl_string vpgl_camera< T >::is_a ( ) const [inline, inherited]

Reimplemented in vpgl_geo_camera.

Definition at line 37 of file vpgl_camera.h.

template<class T>
bool vpgl_camera< T >::is_class ( vcl_string const &  name) const [inline, inherited]

Reimplemented in vpgl_geo_camera.

Definition at line 38 of file vpgl_camera.h.

template<class T>
vpgl_lvcs vpgl_local_rational_camera< T >::lvcs ( ) const [inline]

Definition at line 60 of file vpgl_local_rational_camera.h.

template<class T>
T vpgl_rational_camera< T >::offset ( const coor_index  coor_index) const [inline, inherited]

get a specific offset value.

Definition at line 187 of file vpgl_rational_camera.h.

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

Equality test.

Definition at line 49 of file vpgl_local_rational_camera.h.

template<class T>
bool vpgl_rational_camera< T >::operator== ( vpgl_rational_camera< T > const &  that) const [inline, inherited]

Equality test.

Definition at line 156 of file vpgl_rational_camera.h.

template<class T>
vnl_vector_fixed< T, 20 > vpgl_rational_camera< T >::power_vector ( const T  x,
const T  y,
const T  z 
) const [protected, inherited]

Create a vector with the standard order of monomial terms.

Definition at line 136 of file vpgl_rational_camera.txx.

template<class T >
void vpgl_local_rational_camera< T >::print ( vcl_ostream &  s = vcl_cout) const [virtual]

print the camera parameters.

Reimplemented from vpgl_rational_camera< T >.

Definition at line 84 of file vpgl_local_rational_camera.txx.

template<class T >
void vpgl_local_rational_camera< T >::project ( const T  x,
const T  y,
const T  z,
T &  u,
T &  v 
) const [virtual]

The generic camera interface. u represents image column, v image row.

Reimplemented from vpgl_rational_camera< T >.

Definition at line 52 of file vpgl_local_rational_camera.txx.

template<class T >
vnl_vector_fixed< T, 2 > vpgl_local_rational_camera< T >::project ( vnl_vector_fixed< T, 3 > const &  world_point) const [virtual]

Project a world point onto the image.

Reimplemented from vpgl_rational_camera< T >.

Definition at line 65 of file vpgl_local_rational_camera.txx.

template<class T >
vgl_point_2d< T > vpgl_local_rational_camera< T >::project ( vgl_point_3d< T >  world_point) const [virtual]

Project a world point onto the image.

Reimplemented from vpgl_rational_camera< T >.

Definition at line 75 of file vpgl_local_rational_camera.txx.

template<class T >
bool vpgl_local_rational_camera< T >::save ( vcl_string  cam_path) [virtual]

save to file (the lvcs is after the global rational camera parameters).

Reimplemented from vpgl_rational_camera< T >.

Definition at line 92 of file vpgl_local_rational_camera.txx.

template<class T>
T vpgl_rational_camera< T >::scale ( const coor_index  coor_index) const [inline, inherited]

get a specific scale value.

Definition at line 184 of file vpgl_rational_camera.h.

template<class T>
vcl_vector<vpgl_scale_offset<T> > vpgl_rational_camera< T >::scale_offsets ( ) const [inline, inherited]

get the scale and offsets in a vector.

Definition at line 175 of file vpgl_rational_camera.h.

template<class T>
vpgl_scale_offset<T> vpgl_rational_camera< T >::scl_off ( const coor_index  coor_index) const [inline, inherited]

get a specific scale_offset.

Definition at line 190 of file vpgl_rational_camera.h.

template<class T>
void vpgl_rational_camera< T >::set_coefficients ( vcl_vector< vcl_vector< T > > const &  rational_coeffs) [inherited]

set rational polynomial coefficients.

Definition at line 106 of file vpgl_rational_camera.txx.

template<class T>
void vpgl_rational_camera< T >::set_coefficients ( vnl_matrix_fixed< T, 4, 20 > const &  rational_coeffs) [inline, inherited]

Definition at line 165 of file vpgl_rational_camera.h.

template<class T>
void vpgl_rational_camera< T >::set_image_offset ( const T  u_off,
const T  v_off 
) [inline, inherited]

set u-v translation offset.

Definition at line 196 of file vpgl_rational_camera.h.

template<class T>
void vpgl_rational_camera< T >::set_image_scale ( const T  u_scale,
const T  v_scale 
) [inline, inherited]

set u-v scale.

Definition at line 205 of file vpgl_rational_camera.h.

template<class T>
void vpgl_local_rational_camera< T >::set_lvcs ( vpgl_lvcs const &  lvcs) [inline]

set the local vertical coordinate system.

Definition at line 58 of file vpgl_local_rational_camera.h.

template<class T>
void vpgl_rational_camera< T >::set_offset ( const coor_index  coor_index,
const T  offset 
) [inline, inherited]

set a specific scale value.

Definition at line 181 of file vpgl_rational_camera.h.

template<class T>
void vpgl_rational_camera< T >::set_scale ( const coor_index  coor_index,
const T  scale 
) [inline, inherited]

set a specific scale value.

Definition at line 178 of file vpgl_rational_camera.h.

template<class T>
void vpgl_rational_camera< T >::set_scale_offsets ( vcl_vector< vpgl_scale_offset< T > > const &  scale_offsets) [inherited]

set coordinate scale and offsets.

Definition at line 115 of file vpgl_rational_camera.txx.

template<class T>
virtual vcl_string vpgl_local_rational_camera< T >::type_name ( ) const [inline, virtual]

class identity functions for casting.

Reimplemented from vpgl_rational_camera< T >.

Definition at line 42 of file vpgl_local_rational_camera.h.


Friends And Related Function Documentation

template<class T >
vcl_ostream & operator<< ( vcl_ostream &  s,
const vpgl_local_rational_camera< T > &  p 
) [related]

Write to stream.

template<class T >
vcl_ostream & operator<< ( vcl_ostream &  s,
const vpgl_rational_camera< T > &  p 
) [related]

Write to stream.

template<class T >
vcl_istream & operator>> ( vcl_istream &  is,
vpgl_local_rational_camera< T > &  p 
) [related]

Read from stream.

template<class T >
vcl_istream & operator>> ( vcl_istream &  is,
vpgl_rational_camera< T > &  p 
) [related]

Read from stream.

template<class T >
vpgl_local_rational_camera< T > * read_local_rational_camera ( vcl_string  cam_path) [related]

Creates a local rational camera from a file.

template<class T >
vpgl_local_rational_camera< T > * read_local_rational_camera ( vcl_istream &  istr) [related]

Creates a local rational camera from a file.

template<class T >
vpgl_rational_camera< T > * read_rational_camera ( vcl_string  cam_path) [related]

Creates a rational camera from a file.

template<class T >
vpgl_rational_camera< T > * read_rational_camera ( vcl_istream &  istr) [related]

Creates a rational camera from a stream.


Member Data Documentation

template<class T>
vpgl_lvcs vpgl_local_rational_camera< T >::lvcs_ [protected]

Definition at line 84 of file vpgl_local_rational_camera.h.

template<class T>
vnl_matrix_fixed<T, 4, 20> vpgl_rational_camera< T >::rational_coeffs_ [protected, inherited]

Definition at line 235 of file vpgl_rational_camera.h.

template<class T>
vcl_vector<vpgl_scale_offset<T> > vpgl_rational_camera< T >::scale_offsets_ [protected, inherited]

Definition at line 236 of file vpgl_rational_camera.h.


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