Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vpgl_generic_camera< T > Class Template Reference

#include <vpgl_generic_camera.h>

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

Public Member Functions

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

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. More...
 
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. More...
 
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. More...
 

Protected Attributes

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

Detailed Description

template<class T>
class vpgl_generic_camera< T >

Definition at line 39 of file vpgl_generic_camera.h.

Constructor & Destructor Documentation

◆ vpgl_generic_camera() [1/3]

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

Definition at line 25 of file vpgl_generic_camera.hxx.

◆ vpgl_generic_camera() [2/3]

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

Definition at line 33 of file vpgl_generic_camera.hxx.

◆ vpgl_generic_camera() [3/3]

template<class T >
vpgl_generic_camera< T >::vpgl_generic_camera ( std::vector< vbl_array_2d< vgl_ray_3d< T > > > const &  rays,
std::vector< int >  nrs,
std::vector< int >  ncs 
)

Definition at line 85 of file vpgl_generic_camera.hxx.

◆ ~vpgl_generic_camera()

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

Member Function Documentation

◆ cols() [1/2]

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 55 of file vpgl_generic_camera.h.

◆ cols() [2/2]

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

Definition at line 56 of file vpgl_generic_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.

◆ max_ray_direction()

template<class T>
vgl_vector_3d<T> vpgl_generic_camera< T >::max_ray_direction ( )
inline

Definition at line 80 of file vpgl_generic_camera.h.

◆ max_ray_origin()

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 79 of file vpgl_generic_camera.h.

◆ min_ray_direction()

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

Definition at line 76 of file vpgl_generic_camera.h.

◆ min_ray_origin()

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

◆ n_levels()

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

the number of pyramid levels.

Definition at line 63 of file vpgl_generic_camera.h.

◆ nearest_ray()

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 119 of file vpgl_generic_camera.hxx.

◆ nearest_ray_to_point()

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 143 of file vpgl_generic_camera.hxx.

◆ print_orig()

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

debug function.

Definition at line 373 of file vpgl_generic_camera.hxx.

◆ print_to_vrml()

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

visualization.

Definition at line 385 of file vpgl_generic_camera.hxx.

◆ project()

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

Implements vpgl_camera< T >.

Definition at line 292 of file vpgl_generic_camera.hxx.

◆ ray() [1/2]

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 305 of file vpgl_generic_camera.hxx.

◆ ray() [2/2]

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 183 of file vpgl_generic_camera.hxx.

◆ rays()

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 72 of file vpgl_generic_camera.h.

◆ refine_projection()

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 198 of file vpgl_generic_camera.hxx.

◆ refine_ray_at_point()

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 167 of file vpgl_generic_camera.hxx.

◆ rows() [1/2]

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 59 of file vpgl_generic_camera.h.

◆ rows() [2/2]

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

Definition at line 60 of file vpgl_generic_camera.h.

◆ type_name()

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

class identity functions for casting.

Reimplemented from vpgl_camera< T >.

Definition at line 49 of file vpgl_generic_camera.h.

Member Data Documentation

◆ max_ray_direction_

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

Definition at line 112 of file vpgl_generic_camera.h.

◆ max_ray_origin_

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

◆ min_ray_direction_

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

Definition at line 109 of file vpgl_generic_camera.h.

◆ min_ray_origin_

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 108 of file vpgl_generic_camera.h.

◆ n_levels_

template<class T>
unsigned long 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 116 of file vpgl_generic_camera.h.

◆ nc_

template<class T>
std::vector<int> vpgl_generic_camera< T >::nc_
protected

num cols at each resolution level.

Definition at line 120 of file vpgl_generic_camera.h.

◆ nr_

template<class T>
std::vector<int> vpgl_generic_camera< T >::nr_
protected

num rows at each resolution level.

Definition at line 118 of file vpgl_generic_camera.h.

◆ rays_

template<class T>
std::vector<vbl_array_2d<vgl_ray_3d<T> > > vpgl_generic_camera< T >::rays_
protected

the pyramid.

Definition at line 122 of file vpgl_generic_camera.h.


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