zoukankan      html  css  js  c++  java
  • class FrameHandlerMono : public FrameHandlerBase

    单目视觉里程计流程图

    class FrameHandlerMono : public FrameHandlerBase

    FrameHandlerMono::FrameHandlerMono(vk::AbstractCamera* cam) :
      FrameHandlerBase(),
      cam_(cam),
      reprojector_(cam_, map_),
      depth_filter_(NULL)
    {
      initialize();
    }

    构造函数,进进行初始化

    void FrameHandlerMono::initialize()
    初始化函数

    主要功能

    构建点和线段特征的特征提取器

      // create a point feature detector instance
      feature_detection::DetectorPtr<PointFeat> pt_feature_detector;
      if(Config::hasPoints())
        pt_feature_detector = feature_detection::DetectorPtr<PointFeat>(
              new feature_detection::FastDetector(
                cam_->width(), cam_->height(), Config::gridSize(), Config::nPyrLevels()));
      else
        // create an abstract (void) detector that detects nothing to deactivate use of points
        pt_feature_detector = feature_detection::DetectorPtr<PointFeat>(
              new feature_detection::AbstractDetector<PointFeat>(
                cam_->width(), cam_->height(), Config::gridSize(), Config::nPyrLevels()));
      // create a segment feature detector instance
      feature_detection::DetectorPtr<LineFeat> seg_feature_detector;
      if(Config::hasLines())
        seg_feature_detector = feature_detection::DetectorPtr<LineFeat>(
              new feature_detection::LsdDetector(
                cam_->width(), cam_->height(), Config::gridSizeSegs(), Config::nPyrLevelsSegs()));
      else
        // create an abstract (void) detector that detects nothing to deactivate use of line segs
        seg_feature_detector = feature_detection::DetectorPtr<LineFeat>(
              new feature_detection::AbstractDetector<LineFeat>(
                cam_->width(), cam_->height(), Config::gridSizeSegs(), Config::nPyrLevelsSegs()));

    创建点和线段特征的深度滤波器

      // create the callback object for the Depth-Filter
      DepthFilter::callback_t depth_filter_cb = boost::bind(
          &MapPointCandidates::newCandidatePoint, &map_.point_candidates_, _1, _2);
    
      DepthFilter::callback_t_ls depth_filter_cb_ls = boost::bind(
          &MapSegmentCandidates::newCandidateSegment, &map_.segment_candidates_, _1, _2, _3);
    
      // Setup the Depth-Filter object
      depth_filter_ = new DepthFilter(pt_feature_detector, seg_feature_detector, depth_filter_cb, depth_filter_cb_ls );
      depth_filter_->startThread();
    }

      vo_->start();
    启动函数,设置

      /// Start processing.
      void start() { set_start_ = true; }
  • 相关阅读:
    观察是快速成长的一个牛逼技能
    linux下使用lftp的小结(转)
    关于升级cocos2d-x网络库来支持ipv6、https,以及socket怎么支持ipv6
    cocos2dx支持arm64
    android studio 命令行编译cocos 3.15.1 安卓工程
    认识Android.mk和Application.mk
    mac os x下Android Studio3.0 配置本地 Gradle
    图片转成base64编码
    集成pbc
    6、SpringMVC:结果跳转方式 和 数据提交时的处理
  • 原文地址:https://www.cnblogs.com/feifanrensheng/p/10502077.html
Copyright © 2011-2022 走看看