FeatureInitsReader.h

Go to the documentation of this file.
00001 // This file is part of the SLAMDUNK visual SLAM evaluation framework.
00002 //
00003 // Copyright (C) 2009 by Jan Funke <jan.funke@inf.tu-dresden.de>
00004 //                   and Tobias Pietzsch <tobias.pietzsch@inf.tu-dresden.de>
00005 //
00006 // SLAMDUNK is free software; you can redistribute it and/or modify it under
00007 // the terms of the GNU General Public License as published by the Free
00008 // Software Foundation; either version 3 of the License, or (at your option)
00009 // any later version.
00010 //
00011 // SLAMDUNK is distributed in the hope that it will be useful, but WITHOUT ANY
00012 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00013 // FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00014 // details.
00015 //
00016 // You should have received a copy of the GNU General Public License along with
00017 // this software.  If not, write to the Free Software Foundation, 59 Temple
00018 // Place - Suite 330, Boston, MA 02111-1307, USA.
00019 
00020 #ifndef _FEATURE_INITS_READER_H
00021 #define _FEATURE_INITS_READER_H
00022 
00023 
00024 #include <string>
00025 #include <vector>
00026 
00027 
00028 namespace vslam_evaluation {
00029 
00030 
00037 class FeatureInitsReader
00038 {
00039 public:
00048     FeatureInitsReader (const std::string& fn_feature_inits);
00049 
00050 
00054     struct FeatureInit
00055     {
00057         double timestamp_;
00058 
00060         int feature_id_;
00061 
00063         double image_position_u_;
00064 
00066         double image_position_v_;
00067 
00069         bool has_disparity_;
00070 
00072         double image_position_d_;
00073 
00075         bool has_normal_;
00076 
00078         double relative_normal_x_;
00079 
00081         double relative_normal_y_;
00082 
00084         double relative_normal_z_;
00085 
00101         FeatureInit (double t, int id, double u, double v,
00102                 bool has_disparity, double d,
00103                 bool has_normal, double normal_x, double normal_y, double normal_z)
00104           : timestamp_         (t),
00105             feature_id_        (id),
00106             image_position_u_  (u),
00107             image_position_v_  (v),
00108             has_disparity_     (has_disparity),
00109             image_position_d_  (d),
00110             has_normal_        (has_normal),
00111             relative_normal_x_ (normal_x),
00112             relative_normal_y_ (normal_y),
00113             relative_normal_z_ (normal_z)
00114         {}
00115     };
00116 
00117 
00125     std::vector <FeatureInitsReader::FeatureInit> getInitsForTimestamp (double timestamp, double tolerance = 0.0001) const;
00126 
00127 private:
00128     std::vector <FeatureInitsReader::FeatureInit> featureInits_;
00129 };
00130 
00131 
00132 } // namespace vslam_evaluation
00133 
00134 
00135 #endif // _FEATURE_INITS_READER_H

Generated on Mon Jan 11 13:11:57 2010 for VSLAM API by  doxygen 1.5.6