keyframes.hpp
Go to the documentation of this file.
00001 
00004 /*****************************************************************************
00005 ** Ifdefs
00006 *****************************************************************************/
00007 
00008 #ifndef qglv_OBJECTS_KEYFRAME_HPP_
00009 #define qglv_OBJECTS_KEYFRAME_HPP_
00010 
00011 /*****************************************************************************
00012 ** Includes
00013 *****************************************************************************/
00014 
00015 #include <memory>
00016 
00017 #include "../gl/colours.hpp"
00018 
00019 /*****************************************************************************
00020 ** Namespaces
00021 *****************************************************************************/
00022 
00023 namespace qglv {
00024 
00025 /*****************************************************************************
00026 ** KeyFrame
00027 *****************************************************************************/
00028 
00042 class KeyFrame 
00043 {
00044 public:
00045   KeyFrame()
00046   : id(-1)
00047   , pinned(false)
00048   , updated(false)
00049   , gl_id_start(-1)
00050   , axis_colour_scheme(AxisColourRGB)
00051   , axis_scale_factor(1.0)
00052   {}
00053 
00057   KeyFrame(const int id,
00058            const Sophus::SE3f& T_frame_rel_map,
00059            const AxisColourScheme& axis_colour_scheme=AxisColourRGB,
00060            const float& axis_scale_factor=1.0);
00061   
00065   KeyFrame(const int id,
00066            const Sophus::SE3f& T,
00067            const bool& pinned,
00068            const std::vector< Eigen::Vector3f > & seeds, 
00069            const std::vector<float> & seed_variances,
00070            const std::vector<unsigned char>& seed_intensities, // intensity
00071            const float& focal_length_times_baseline
00072           );
00073 
00077   KeyFrame(const int id,
00078            const Sophus::SE3f& T,
00079            const bool& pinned,
00080            const std::vector<float> & nics,
00081            const std::vector<float> & idepths, 
00082            const std::vector<float> & seed_variances,
00083            const std::vector<unsigned char>& seed_intensities_and_grad, // it consists of intensity, gx, gy. you have to use intensity
00084            const float& focal_length_times_baseline
00085           );
00089   KeyFrame(
00090            const Sophus::SE3f& T,
00091            const std::vector<float> & nics,
00092            const std::vector<float> & idepths, 
00093            const std::vector<float> & seed_variances,
00094            const std::vector<unsigned char>& seed_intensities_and_grad // as a ratio, to convert to rgb. // it consists of intensity, gx, gy. you have to use intensity
00095           );
00096   ~KeyFrame();
00097 
00098 
00099   void setName(const std::string& name);
00100   void draw(
00101       bool draw_frames = true,
00102       bool draw_seeds = false,
00103       bool draw_covariances = false
00104       );
00105 
00106   int id;                       
00107   Sophus::SE3f T_frame_rel_map; 
00108   AxisColourScheme axis_colour_scheme;
00109   float axis_scale_factor;
00110   static const float default_keyframe_size;
00111   bool pinned;                  
00112   bool updated;                 
00113   std::vector<unsigned char> intensities; // N*3
00114   std::vector<float> vertices;
00115   std::vector<float> variance_lines;
00116 
00117 private:
00118   void _glGenLists();
00119 
00120   int gl_id_start;              
00121   std::string name;
00122 };
00123 
00124 /*****************************************************************************
00125  ** Typedefs
00126  *****************************************************************************/
00127 
00128 typedef std::shared_ptr<KeyFrame> KeyFramePtr;
00129 
00130 } // namespace qglv
00131 
00132 #endif /* qglv_OBJECTS_KEYFRAME_HPP_ */


qglv_opengl
Author(s): Daniel Stonier
autogenerated on Sat Jun 18 2016 08:19:28