2 #ifndef vpgl_generic_camera_h_ 3 #define vpgl_generic_camera_h_ 35 # include <vcl_msvc_warnings.h> 46 std::vector<int> nrs, std::vector<int> ncs );
49 std::string
type_name()
const override {
return "vpgl_generic_camera"; }
52 void project(
const T x,
const T y,
const T z, T& u, T& v)
const override;
55 unsigned cols(
int level)
const {
return rays_[level].cols();}
59 unsigned rows(
int level)
const {
return rays_[level].rows();}
90 int& nearest_r,
int& nearest_c)
const;
93 int start_r,
int end_r,
int start_c,
int end_c,
94 int& nearest_r,
int& nearest_c)
const;
122 std::vector<vbl_array_2d<vgl_ray_3d<T> > >
rays_;
125 #endif // vpgl_generic_camera_h_
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.
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.
vgl_point_3d< T > min_ray_origin_
ray origin bound to support occlusion reasoning.
void nearest_ray_to_point(vgl_point_3d< T > const &p, int &nearest_r, int &nearest_c) const
vgl_vector_3d< T > min_ray_direction()
vgl_vector_3d< T > max_ray_direction_
std::vector< vbl_array_2d< vgl_ray_3d< T > > > rays_
the pyramid.
void print_to_vrml(int level, std::ostream &os)
visualization.
unsigned n_levels()
the number of pyramid levels.
vbl_array_2d< vgl_ray_3d< T > > & rays(int level)
the ray index at a given level.
unsigned long n_levels_
a pyramid data structure for the rays to support efficient projection.
unsigned rows(int level) const
the number of rows (v coordinate) in the ray image.
vgl_vector_3d< T > max_ray_direction()
void print_orig(int level)
debug function.
std::vector< int > nr_
num rows at each resolution level.
vgl_vector_3d< T > min_ray_direction_
std::vector< int > nc_
num cols at each resolution level.
vgl_ray_3d< T > ray(const T u, const T v) const
the ray corresponding to a given pixel.
vgl_point_3d< T > max_ray_origin()
the furthest ray origin from the coordinate origin.
unsigned cols(int level) const
the number of columns (u coordinate) in the ray image.
vgl_point_3d< T > min_ray_origin()
the nearest ray origin to the coordinate origin.
std::string type_name() const override
class identity functions for casting.
vgl_point_3d< T > max_ray_origin_
ray origin bound to support occlusion reasoning.
~vpgl_generic_camera() override=default
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 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 pyrami...