stereo_frame.hpp
Go to the documentation of this file.
00001 #ifndef __fovis_stereo_frame_hpp__
00002 #define __fovis_stereo_frame_hpp__
00003 
00004 #include <stdint.h>
00005 #include <assert.h>
00006 
00007 #include <vector>
00008 #include <Eigen/Geometry>
00009 
00010 #include "options.hpp"
00011 #include "keypoint.hpp"
00012 #include "pyramid_level.hpp"
00013 #include "rectification.hpp"
00014 
00015 namespace fovis
00016 {
00017 
00024 class StereoFrame
00025 {
00026   public:
00027     StereoFrame(int width, int height,
00028                 const Rectification* rectify_map,
00029                 const VisualOdometryOptions& options);
00030 
00031     ~StereoFrame();
00032 
00033     void prepareFrame(const uint8_t* raw_gray, int fast_threshold);
00034 
00035     int getNumDetectedKeypoints() const {
00036       int result = 0;
00037       for(int i=0; i<_num_levels; i++)
00038         result += _levels[i]->getNumDetectedKeypoints();
00039       return result;
00040     }
00041 
00042     PyramidLevel * getLevel(int level_num) { return _levels[level_num]; }
00043 
00044     void rectify(Eigen::Vector2d xy_in, Eigen::Vector2d * out) {
00045       _rectify_map->rectifyBilinearLookup(xy_in, out);
00046     }
00047 
00048   private:
00049     void initialize(int bucket_width, int bucket_height, int max_keypoints_per_bucket);
00050 
00051     int _base_width;
00052     int _base_height;
00053     int _feature_window_size;
00054 
00055     int _num_levels;
00056     std::vector<PyramidLevel *> _levels;
00057 
00058     Rectification* _rectify_map;
00059 
00060     bool _use_bucketing;
00061     bool _use_image_normalization;
00062 };
00063 
00064 }
00065 
00066 #endif


libfovis
Author(s): Albert Huang, Maurice Fallon
autogenerated on Thu Jun 6 2019 20:16:12