00001 // This is brl/bseg/bmrf/bmrf_curve_3d.h 00002 #ifndef bmrf_curve_3d_h_ 00003 #define bmrf_curve_3d_h_ 00004 //: 00005 // \file 00006 // \brief A 3D curve 00007 // \author Matt Leotta, (mleotta@lems.brown.edu) 00008 // \date 3/23/04 00009 // 00010 // \verbatim 00011 // Modifications 00012 // \endverbatim 00013 00014 #include <bmrf/bmrf_curvel_3d_sptr.h> 00015 #include <vnl/vnl_double_3x4.h> 00016 #include <vbl/vbl_ref_count.h> 00017 #include <vsl/vsl_binary_io.h> 00018 #include <vcl_list.h> 00019 #include <vcl_set.h> 00020 #include <vcl_map.h> 00021 00022 //: A 3D curve 00023 class bmrf_curve_3d : public vcl_list<bmrf_curvel_3d_sptr>, public vbl_ref_count 00024 { 00025 public: 00026 //: Constructor 00027 bmrf_curve_3d(); 00028 00029 //: Destructor 00030 ~bmrf_curve_3d() {} 00031 00032 //: Trim the ends of the curve with few correspondences 00033 void trim(int min_prj); 00034 00035 //: Trim curvels with large deviation in gamma 00036 void stat_trim(double max_std); 00037 00038 //: Attempt to fill in missing correspondences 00039 void fill_gaps(const vcl_set<int>& frames, double da); 00040 00041 //: Attempt to interpolate artificial values for missing correspondences 00042 void interp_gaps(const vcl_set<int>& frames); 00043 00044 //: Simultaneously reconstruct all points in a 3d curve 00045 void reconstruct(const vcl_map<int,vnl_double_3x4>& cameras, float sigma = 0.5); 00046 00047 //: Binary save self to stream. 00048 void b_write(vsl_b_ostream &os) const; 00049 00050 //: Binary load self from stream. 00051 void b_read(vsl_b_istream &is); 00052 00053 //: Return IO version number; 00054 short version() const; 00055 00056 //: Print an ascii summary to the stream 00057 void print_summary(vcl_ostream &os) const; 00058 00059 }; 00060 00061 00062 //: Binary save bmrf_curve_3d* to stream. 00063 void vsl_b_write(vsl_b_ostream &os, const bmrf_curve_3d* n); 00064 00065 //: Binary load bmrf_curve_3d* from stream. 00066 void vsl_b_read(vsl_b_istream &is, bmrf_curve_3d* &n); 00067 00068 //: Print an ASCII summary to the stream 00069 void vsl_print_summary(vcl_ostream &os, const bmrf_curve_3d* n); 00070 00071 00072 #endif // bmrf_curve_3d_h_
1.4.4