00001 #ifndef brct_corr_h_ 00002 #define brct_corr_h_ 00003 //: 00004 // \file 00005 // \brief A class to store image correspondences 00006 // \author J.L. Mundy 00007 // \date Initial version Feb. 2004 00008 // 00009 // \verbatim 00010 // Initial version Feb. 2004 00011 // May 1, 2004 00012 // modified to make more generic using a correspondence base class - JLM 00013 // Modifications 00014 // 10-sep-2004 Peter Vanroose Added copy ctor with explicit vbl_ref_count init 00015 // \endverbatim 00016 // 00017 ////////////////////////////////////////////////////////////////////// 00018 00019 #include <vbl/vbl_ref_count.h> 00020 #include <vcl_vector.h> 00021 #include <vcl_iosfwd.h> 00022 #include <vgl/vgl_homg_point_2d.h> 00023 00024 class brct_corr : public vbl_ref_count 00025 { 00026 public: 00027 brct_corr(const int n_cams); 00028 brct_corr(brct_corr const& x) 00029 : vbl_ref_count(), n_cams_(x.n_cams_){} 00030 ~brct_corr(); 00031 //:Accessors 00032 int n_cams() const {return n_cams_;} 00033 bool valid(const int cam) const {return valid_[cam];} 00034 vgl_homg_point_2d<double> match(const int cam) const {return matches_[cam];} 00035 00036 //:Mutators 00037 void set_match(const int cam, const double x, const double y); 00038 //: Utility functions 00039 friend vcl_ostream& operator<<(vcl_ostream& s, brct_corr const& c); 00040 protected: 00041 brct_corr();//shouldn't use this constructor 00042 //members 00043 int n_cams_;//number of views 00044 //camera match point 00045 vcl_vector<vgl_homg_point_2d<double> > matches_;//match in each camera 00046 vcl_vector<bool> valid_; //has match been set? 00047 }; 00048 00049 #endif // brct_corr_h_
1.7.5.1