PatchFile.h
Go to the documentation of this file.
00001 
00024 #ifndef __PATCH_FILE__
00025 #define __PATCH_FILE__
00026 
00027 #include <string>
00028 #include <vector>
00029 
00030 namespace DVision {
00031 
00033 namespace PMVS {
00034 
00036 class PatchFile
00037 {
00038 public:
00040   struct Patch
00041   {
00042     double x, y, z, s; // s: scale (homogenous coordinates)
00043     double nx, ny, nz, ns; // ns: idem
00044     
00046     double consistency, dbg1, dbg2;
00048     std::vector<int> strong_visibility_list;
00050     std::vector<int> weak_visibility_list;
00051   };
00052 public:
00060   static void readFile(const std::string &filename, 
00061     std::vector<std::vector<int> > &visibility, bool use_weak_list = false);
00062 
00068   static void readFile(const std::string &filename, 
00069     std::vector<Patch> &patches);
00070 
00076   static void saveFile(const std::string &filename,
00077     const std::vector<Patch> &patches);
00078 
00079 protected:
00080 
00087   static void readVisibilityIndices(std::fstream &f, 
00088     std::vector<std::vector<int> > &visibility, int pt_idx);
00089   
00095   static int parseInt(const std::string &s);
00096 
00102   static int getNumberOfPoints(const std::string &filename);
00103 
00104 };
00105 
00106 }
00107 }
00108 
00109 #endif


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:32:05