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

#include <vpgl_generic_camera.h>

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

List of all members.

Public Member Functions

 vpgl_generic_camera ()
 vpgl_generic_camera (vbl_array_2d< vgl_ray_3d< T > > const &rays)
virtual ~vpgl_generic_camera ()
virtual vcl_string type_name () const
 class identity functions for casting.
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. Finds projection using a pyramid search over the rays and so not particularly efficient.
unsigned cols (int level) const
 the number of columns (u coordinate) in the ray image.
unsigned cols () const
unsigned rows (int level) const
 the number of rows (v coordinate) in the ray image.
unsigned rows () const
unsigned n_levels ()
 the number of pyramid levels.
vgl_ray_3d< T > ray (const T u, const T v) const
 the ray corresponding to a given pixel.
vgl_ray_3d< T > ray (vgl_point_3d< T > const &p) const
 a ray passing through a given 3-d point.
vbl_array_2d< vgl_ray_3d< T > > & rays (int level)
 the ray index at a given level.
vgl_point_3d< T > min_ray_origin ()
 the nearest ray origin to the coordinate origin.
vgl_vector_3d< T > min_ray_direction ()
vgl_point_3d< T > max_ray_origin ()
 the furthest ray origin from the coordinate origin.
vgl_vector_3d< T > max_ray_direction ()
void print_orig (int level)
 debug function.
void print_to_vrml (int level, vcl_ostream &os)
 visualization.
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

void nearest_ray_to_point (vgl_point_3d< T > const &p, int &nearest_r, int &nearest_c) const
void nearest_ray (int level, vgl_point_3d< T > const &p, int start_r, int end_r, int start_c, int end_c, int &nearest_r, int &nearest_c) const
 nearest ray at level.
void refine_projection (int nearest_c, int nearest_r, vgl_point_3d< T > const &p, T &u, T &v) const
 refine the projection to sub pixel.
void refine_ray_at_point (int nearest_c, int nearest_r, vgl_point_3d< T > const &p, vgl_ray_3d< T > &ray) const
 refine ray.

Protected Attributes

vgl_point_3d< T > min_ray_origin_
 ray origin bound to support occlusion reasoning.
vgl_vector_3d< T > min_ray_direction_
vgl_point_3d< T > max_ray_origin_
 ray origin bound to support occlusion reasoning.
vgl_vector_3d< T > max_ray_direction_
int n_levels_
 a pyramid data structure for the rays to support efficient projection.
vcl_vector< int > nr_
 num rows at each resolution level.
vcl_vector< int > nc_
 num cols at each resolution level.
vcl_vector< vbl_array_2d
< vgl_ray_3d< T > > > 
rays_
 the pyramid.

Detailed Description

template<class T>
class vpgl_generic_camera< T >

Definition at line 33 of file vpgl_generic_camera.h.


Constructor & Destructor Documentation

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

Definition at line 20 of file vpgl_generic_camera.txx.

template<class T >
vpgl_generic_camera< T >::vpgl_generic_camera ( vbl_array_2d< vgl_ray_3d< T > > const &  rays)

Definition at line 28 of file vpgl_generic_camera.txx.

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

Definition at line 40 of file vpgl_generic_camera.h.


Member Function Documentation

template<class T>
unsigned vpgl_generic_camera< T >::cols ( int  level) const [inline]

the number of columns (u coordinate) in the ray image.

Definition at line 48 of file vpgl_generic_camera.h.

template<class T>
unsigned vpgl_generic_camera< T >::cols ( ) const [inline]

Definition at line 49 of file vpgl_generic_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>
vgl_vector_3d<T> vpgl_generic_camera< T >::max_ray_direction ( ) [inline]

Definition at line 73 of file vpgl_generic_camera.h.

template<class T>
vgl_point_3d<T> vpgl_generic_camera< T >::max_ray_origin ( ) [inline]

the furthest ray origin from the coordinate origin.

Definition at line 72 of file vpgl_generic_camera.h.

template<class T>
vgl_vector_3d<T> vpgl_generic_camera< T >::min_ray_direction ( ) [inline]

Definition at line 69 of file vpgl_generic_camera.h.

template<class T>
vgl_point_3d<T> vpgl_generic_camera< T >::min_ray_origin ( ) [inline]

the nearest ray origin to the coordinate origin.

Definition at line 68 of file vpgl_generic_camera.h.

template<class T>
unsigned vpgl_generic_camera< T >::n_levels ( ) [inline]

the number of pyramid levels.

Definition at line 56 of file vpgl_generic_camera.h.

template<class T >
void vpgl_generic_camera< T >::nearest_ray ( int  level,
vgl_point_3d< T > const &  p,
int  start_r,
int  end_r,
int  start_c,
int  end_c,
int &  nearest_r,
int &  nearest_c 
) const [protected]

nearest ray at level.

Definition at line 82 of file vpgl_generic_camera.txx.

template<class T >
void vpgl_generic_camera< T >::nearest_ray_to_point ( vgl_point_3d< T > const &  p,
int &  nearest_r,
int &  nearest_c 
) const [protected]

Definition at line 106 of file vpgl_generic_camera.txx.

template<class T >
void vpgl_generic_camera< T >::print_orig ( int  level)

debug function.

Definition at line 321 of file vpgl_generic_camera.txx.

template<class T >
void vpgl_generic_camera< T >::print_to_vrml ( int  level,
vcl_ostream &  os 
)

visualization.

Definition at line 333 of file vpgl_generic_camera.txx.

template<class T >
void vpgl_generic_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. Finds projection using a pyramid search over the rays and so not particularly efficient.

Implements vpgl_camera< T >.

Definition at line 231 of file vpgl_generic_camera.txx.

template<class T >
vgl_ray_3d< T > vpgl_generic_camera< T >::ray ( const T  u,
const T  v 
) const

the ray corresponding to a given pixel.

Definition at line 243 of file vpgl_generic_camera.txx.

template<class T >
vgl_ray_3d< T > vpgl_generic_camera< T >::ray ( vgl_point_3d< T > const &  p) const

a ray passing through a given 3-d point.

Definition at line 146 of file vpgl_generic_camera.txx.

template<class T>
vbl_array_2d<vgl_ray_3d<T> >& vpgl_generic_camera< T >::rays ( int  level) [inline]

the ray index at a given level.

Definition at line 65 of file vpgl_generic_camera.h.

template<class T >
void vpgl_generic_camera< T >::refine_projection ( int  nearest_c,
int  nearest_r,
vgl_point_3d< T > const &  p,
T &  u,
T &  v 
) const [protected]

refine the projection to sub pixel.

Definition at line 161 of file vpgl_generic_camera.txx.

template<class T >
void vpgl_generic_camera< T >::refine_ray_at_point ( int  nearest_c,
int  nearest_r,
vgl_point_3d< T > const &  p,
vgl_ray_3d< T > &  ray 
) const [protected]

refine ray.

Definition at line 130 of file vpgl_generic_camera.txx.

template<class T>
unsigned vpgl_generic_camera< T >::rows ( int  level) const [inline]

the number of rows (v coordinate) in the ray image.

Definition at line 52 of file vpgl_generic_camera.h.

template<class T>
unsigned vpgl_generic_camera< T >::rows ( ) const [inline]

Definition at line 53 of file vpgl_generic_camera.h.

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

class identity functions for casting.

Reimplemented from vpgl_camera< T >.

Definition at line 42 of file vpgl_generic_camera.h.


Member Data Documentation

template<class T>
vgl_vector_3d<T> vpgl_generic_camera< T >::max_ray_direction_ [protected]

Definition at line 105 of file vpgl_generic_camera.h.

template<class T>
vgl_point_3d<T> vpgl_generic_camera< T >::max_ray_origin_ [protected]

ray origin bound to support occlusion reasoning.

Definition at line 104 of file vpgl_generic_camera.h.

template<class T>
vgl_vector_3d<T> vpgl_generic_camera< T >::min_ray_direction_ [protected]

Definition at line 102 of file vpgl_generic_camera.h.

template<class T>
vgl_point_3d<T> vpgl_generic_camera< T >::min_ray_origin_ [protected]

ray origin bound to support occlusion reasoning.

Definition at line 101 of file vpgl_generic_camera.h.

template<class T>
int vpgl_generic_camera< T >::n_levels_ [protected]

a pyramid data structure for the rays to support efficient projection.

(level == 0 is the highest resolution)

Definition at line 109 of file vpgl_generic_camera.h.

template<class T>
vcl_vector<int> vpgl_generic_camera< T >::nc_ [protected]

num cols at each resolution level.

Definition at line 113 of file vpgl_generic_camera.h.

template<class T>
vcl_vector<int> vpgl_generic_camera< T >::nr_ [protected]

num rows at each resolution level.

Definition at line 111 of file vpgl_generic_camera.h.

template<class T>
vcl_vector<vbl_array_2d<vgl_ray_3d<T> > > vpgl_generic_camera< T >::rays_ [protected]

the pyramid.

Definition at line 115 of file vpgl_generic_camera.h.


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