SequenceReader.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 __SEQUENCE_READER_H
00021 #define __SEQUENCE_READER_H
00022 
00023 #include <string>
00024 #include <tr1/memory>
00025 
00026 
00027 namespace vslam_evaluation {
00028 
00029 
00030 enum CameraType {
00031     CAMERA_TYPE_MONO,
00032     CAMERA_TYPE_STEREO
00033 };
00034 
00035 
00047 class SequenceReader
00048 {
00049 public:
00054     SequenceReader (const std::string& fn_experiment);
00055 
00056     ~SequenceReader ();
00057 
00066     bool next ();
00067 
00072     double getTimestamp () const;
00073 
00085     unsigned char* getImage () const;
00086 
00091     CameraType getCameraType () const;
00092 
00093 
00097     int getResX () const;
00098 
00099 
00103     int getResY () const;
00104 
00105 
00114     double getFocalLength () const;
00115 
00116 
00121     double getPrincipalPointX () const;
00122 
00123 
00128     double getPrincipalPointY () const;
00129 
00130 
00134     double getShutterSpeed () const;
00135 
00136 
00140     double getFrameRate () const;
00141 
00142 
00147     double getStereoBaseline () const;
00148 
00149 
00155     double getPrincipalPointXLeft () const;
00156 
00157 
00161     struct CameraPose {
00162         double position_x_; 
00163         double position_y_; 
00164         double position_z_; 
00165         double rotation_w_; 
00166         double rotation_x_; 
00167         double rotation_y_; 
00168         double rotation_z_; 
00169         CameraPose (double x, double y, double z, double qw, double qx, double qy, double qz)
00170           : position_x_ (x),
00171             position_y_ (y),
00172             position_z_ (z),
00173             rotation_w_ (qw),
00174             rotation_x_ (qx),
00175             rotation_y_ (qy),
00176             rotation_z_ (qz)
00177         {}
00178     };
00179 
00180 
00184     CameraPose getInitialCameraPose () const;
00185 
00186 
00192     bool existsParameter (const std::string& parameterKey) const;
00193 
00202     std::string getParameterValue (const std::string& parameterKey) const;
00203 
00204 
00208     std::string getSetupFilename () const;
00209 
00210 
00211 private:
00212 
00213     class impl;
00214     std::tr1::shared_ptr <impl> pimpl_;
00215 };
00216 
00217 
00218 } // namespace vslam_evaluation
00219 
00220 
00221 #endif // __SEQUENCE_READER_H

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