00001 // This is gel/mrc/vpgl/vpgl_camera.h 00002 #ifndef vpgl_camera_h_ 00003 #define vpgl_camera_h_ 00004 00005 //: 00006 // \file 00007 // \brief A general camera class. 00008 // \author Thomas Pollard 00009 // \date January 28, 2005 00010 // \author Joseph Mundy, Matt Leotta, Vishal Jain 00011 // 00012 // A basic abstract camera class on which all specific cameras are based. 00013 // As such there is only one operation it performs: 00014 // project a 3d world point into a 2d image point. The class is templated 00015 // over T which had better be an algebraic field. 00016 // \verbatim 00017 // Modifications 00018 // October 26, 2006 - Moved homogeneous methods to projective camera, since 00019 // projective geometry may not apply in the most general case, e.g. rational cameras. - JLM 00020 // \endverbatim 00021 #include <vcl_string.h> 00022 #include <vbl/vbl_ref_count.h> 00023 #include <vbl/vbl_smart_ptr.h> 00024 00025 template<class T> 00026 class vpgl_camera : public vbl_ref_count 00027 { 00028 public: 00029 00030 vpgl_camera() {} 00031 virtual ~vpgl_camera() {} 00032 00033 virtual vcl_string type_name() const { return "vpgl_camera"; } 00034 00035 //: The generic camera interface. u represents image column, v image row. 00036 virtual void project(const T x, const T y, const T z, T& u, T& v) const = 0; 00037 }; 00038 00039 // convienance typedefs for smart pointers to generic cameras 00040 typedef vbl_smart_ptr<vpgl_camera<double> > vpgl_camera_double_sptr; 00041 00042 00043 #endif // vpgl_camera_h_
1.7.5.1