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

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

Protected Attributes

vpgl_lvcs lvcs_
 
vnl_matrix_fixed< T, 4, 20 > rational_coeffs_
 
std::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 (std::string cam_path)
 Creates a local rational camera from a file. More...
 
template<class T >
vpgl_local_rational_camera< T > * read_local_rational_camera (std::istream &istr)
 Creates a local rational camera from a stream (RPB format). More...
 
template<class T >
std::ostream & operator<< (std::ostream &s, const vpgl_local_rational_camera< T > &p)
 Write to stream. More...
 
template<class T >
std::istream & operator>> (std::istream &is, vpgl_local_rational_camera< T > &p)
 Read from stream. More...
 
template<class T >
std::ostream & operator<< (std::ostream &s, const vpgl_rational_camera< T > &p)
 Write to stream. More...
 
template<class T >
std::istream & operator>> (std::istream &is, vpgl_rational_camera< T > &p)
 Read from stream. More...
 
template<class T >
vpgl_rational_camera< T > * read_rational_camera (std::string cam_path)
 Creates a rational camera from a file. More...
 
template<class T >
vpgl_rational_camera< T > * read_rational_camera (std::istream &istr)
 Creates a rational camera from a stream. More...
 
template<class T >
vpgl_rational_camera< T > * read_rational_camera_from_txt (std::string cam_path)
 Creates a rational camera from a txt file. More...
 

Detailed Description

template<class T>
class vpgl_local_rational_camera< T >

Definition at line 28 of file vpgl_local_rational_camera.h.

Member Enumeration Documentation

◆ coor_index

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 111 of file vpgl_rational_camera.h.

◆ poly_index

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 113 of file vpgl_rational_camera.h.

Constructor & Destructor Documentation

◆ vpgl_local_rational_camera() [1/3]

default constructor.

Definition at line 20 of file vpgl_local_rational_camera.hxx.

◆ vpgl_local_rational_camera() [2/3]

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 28 of file vpgl_local_rational_camera.hxx.

◆ vpgl_local_rational_camera() [3/3]

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 38 of file vpgl_local_rational_camera.hxx.

◆ ~vpgl_local_rational_camera()

template<class T>
vpgl_local_rational_camera< T >::~vpgl_local_rational_camera ( )
overridedefault

Member Function Documentation

◆ clone()

template<class T >
vpgl_local_rational_camera< T > * vpgl_local_rational_camera< T >::clone ( void  ) const
overridevirtual

Clone ‘this’: creation of a new object and initialization.

See Prototype pattern

Reimplemented from vpgl_rational_camera< T >.

Definition at line 48 of file vpgl_local_rational_camera.hxx.

◆ coefficient_matrix()

template<class T>
vnl_matrix_fixed<T, 4, 20> vpgl_rational_camera< T >::coefficient_matrix ( ) const
inlineinherited

get the rational polynomial coefficients in a vnl matrix.

Definition at line 174 of file vpgl_rational_camera.h.

◆ coefficients()

template<class T >
std::vector< std::vector< T > > vpgl_rational_camera< T >::coefficients ( ) const
inherited

get the rational polynomial coefficients in a vcl array.

Definition at line 124 of file vpgl_rational_camera.hxx.

◆ image_offset()

template<class T>
void vpgl_rational_camera< T >::image_offset ( T &  u_off,
T &  v_off 
) const
inlineinherited

get u-v translation offset.

Definition at line 205 of file vpgl_rational_camera.h.

◆ image_scale()

template<class T>
void vpgl_rational_camera< T >::image_scale ( T &  u_scale,
T &  v_scale 
)
inlineinherited

get u-v scale.

Definition at line 214 of file vpgl_rational_camera.h.

◆ is_a()

template<class T>
std::string vpgl_camera< T >::is_a ( ) const
inlineinherited

Definition at line 40 of file vpgl_camera.h.

◆ is_class()

template<class T>
bool vpgl_camera< T >::is_class ( std::string const &  name) const
inlineinherited

Definition at line 41 of file vpgl_camera.h.

◆ lvcs()

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

Definition at line 63 of file vpgl_local_rational_camera.h.

◆ offset()

template<class T>
T vpgl_rational_camera< T >::offset ( const coor_index  coor_index) const
inlineinherited

get a specific offset value.

Definition at line 191 of file vpgl_rational_camera.h.

◆ operator==() [1/2]

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

Equality test.

Definition at line 52 of file vpgl_local_rational_camera.h.

◆ operator==() [2/2]

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

Equality test.

Definition at line 160 of file vpgl_rational_camera.h.

◆ power_vector()

template<class T>
vnl_vector_fixed< T, 20 > vpgl_rational_camera< T >::power_vector ( const T  x,
const T  y,
const T  z 
) const
protectedinherited

Create a vector with the standard order of monomial terms.

Definition at line 139 of file vpgl_rational_camera.hxx.

◆ print()

template<class T >
void vpgl_local_rational_camera< T >::print ( std::ostream &  s = std::cout) const
overridevirtual

print the camera parameters.

Reimplemented from vpgl_rational_camera< T >.

Definition at line 87 of file vpgl_local_rational_camera.hxx.

◆ project() [1/3]

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

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

Implements vpgl_camera< T >.

Definition at line 55 of file vpgl_local_rational_camera.hxx.

◆ project() [2/3]

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

Project a world point onto the image.

Reimplemented from vpgl_rational_camera< T >.

Definition at line 68 of file vpgl_local_rational_camera.hxx.

◆ project() [3/3]

template<class T >
vgl_point_2d< T > vpgl_local_rational_camera< T >::project ( vgl_point_3d< T >  world_point) const
overridevirtual

Project a world point onto the image.

Reimplemented from vpgl_rational_camera< T >.

Definition at line 78 of file vpgl_local_rational_camera.hxx.

◆ save()

template<class T >
bool vpgl_local_rational_camera< T >::save ( std::string  cam_path)
overridevirtual

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

Reimplemented from vpgl_rational_camera< T >.

Definition at line 95 of file vpgl_local_rational_camera.hxx.

◆ scale()

template<class T>
T vpgl_rational_camera< T >::scale ( const coor_index  coor_index) const
inlineinherited

get a specific scale value.

Definition at line 188 of file vpgl_rational_camera.h.

◆ scale_offsets()

template<class T>
std::vector<vpgl_scale_offset<T> > vpgl_rational_camera< T >::scale_offsets ( ) const
inlineinherited

get the scale and offsets in a vector.

Definition at line 179 of file vpgl_rational_camera.h.

◆ scl_off()

template<class T>
vpgl_scale_offset<T> vpgl_rational_camera< T >::scl_off ( const coor_index  coor_index) const
inlineinherited

get a specific scale_offset.

Definition at line 194 of file vpgl_rational_camera.h.

◆ set_coefficients() [1/2]

template<class T>
void vpgl_rational_camera< T >::set_coefficients ( std::vector< std::vector< T > > const &  rational_coeffs)
inherited

set rational polynomial coefficients.

Definition at line 109 of file vpgl_rational_camera.hxx.

◆ set_coefficients() [2/2]

template<class T>
void vpgl_rational_camera< T >::set_coefficients ( vnl_matrix_fixed< T, 4, 20 > const &  rational_coeffs)
inlineinherited

Definition at line 169 of file vpgl_rational_camera.h.

◆ set_image_offset()

template<class T>
void vpgl_rational_camera< T >::set_image_offset ( const T  u_off,
const T  v_off 
)
inlineinherited

set u-v translation offset.

Definition at line 200 of file vpgl_rational_camera.h.

◆ set_image_scale()

template<class T>
void vpgl_rational_camera< T >::set_image_scale ( const T  u_scale,
const T  v_scale 
)
inlineinherited

set u-v scale.

Definition at line 209 of file vpgl_rational_camera.h.

◆ set_lvcs()

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 61 of file vpgl_local_rational_camera.h.

◆ set_offset()

template<class T>
void vpgl_rational_camera< T >::set_offset ( const coor_index  coor_index,
const T  offset 
)
inlineinherited

set a specific scale value.

Definition at line 185 of file vpgl_rational_camera.h.

◆ set_scale()

template<class T>
void vpgl_rational_camera< T >::set_scale ( const coor_index  coor_index,
const T  scale 
)
inlineinherited

set a specific scale value.

Definition at line 182 of file vpgl_rational_camera.h.

◆ set_scale_offsets()

template<class T>
void vpgl_rational_camera< T >::set_scale_offsets ( std::vector< vpgl_scale_offset< T > > const &  scale_offsets)
inherited

set coordinate scale and offsets.

Definition at line 118 of file vpgl_rational_camera.hxx.

◆ type_name()

template<class T>
std::string vpgl_local_rational_camera< T >::type_name ( ) const
inlineoverridevirtual

class identity functions for casting.

Reimplemented from vpgl_camera< T >.

Definition at line 45 of file vpgl_local_rational_camera.h.

Friends And Related Function Documentation

◆ operator<<() [1/2]

template<class T >
std::ostream & operator<< ( std::ostream &  s,
const vpgl_local_rational_camera< T > &  p 
)
related

Write to stream.

◆ operator<<() [2/2]

template<class T >
std::ostream & operator<< ( std::ostream &  s,
const vpgl_rational_camera< T > &  p 
)
related

Write to stream.

◆ operator>>() [1/2]

template<class T >
std::istream & operator>> ( std::istream &  is,
vpgl_local_rational_camera< T > &  p 
)
related

Read from stream.

◆ operator>>() [2/2]

template<class T >
std::istream & operator>> ( std::istream &  is,
vpgl_rational_camera< T > &  p 
)
related

Read from stream.

◆ read_local_rational_camera() [1/2]

template<class T >
vpgl_local_rational_camera< T > * read_local_rational_camera ( std::string  cam_path)
related

Creates a local rational camera from a file.

◆ read_local_rational_camera() [2/2]

template<class T >
vpgl_local_rational_camera< T > * read_local_rational_camera ( std::istream &  istr)
related

Creates a local rational camera from a stream (RPB format).

◆ read_rational_camera() [1/2]

template<class T >
vpgl_rational_camera< T > * read_rational_camera ( std::string  cam_path)
related

Creates a rational camera from a file.

◆ read_rational_camera() [2/2]

template<class T >
vpgl_rational_camera< T > * read_rational_camera ( std::istream &  istr)
related

Creates a rational camera from a stream.

◆ read_rational_camera_from_txt()

template<class T >
vpgl_rational_camera< T > * read_rational_camera_from_txt ( std::string  cam_path)
related

Creates a rational camera from a txt file.

Definition at line 625 of file vpgl_rational_camera.hxx.

Member Data Documentation

◆ lvcs_

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

Definition at line 87 of file vpgl_local_rational_camera.h.

◆ rational_coeffs_

template<class T>
vnl_matrix_fixed<T, 4, 20> vpgl_rational_camera< T >::rational_coeffs_
protectedinherited

Definition at line 239 of file vpgl_rational_camera.h.

◆ scale_offsets_

template<class T>
std::vector<vpgl_scale_offset<T> > vpgl_rational_camera< T >::scale_offsets_
protectedinherited

Definition at line 240 of file vpgl_rational_camera.h.


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