zoukankan      html  css  js  c++  java
  • 视觉SLAM十四讲课后习题—ch13

    1.推导式(13.6)

      根据教材后的附录A两个服从高斯分布的随机变量相乘后的结果仍服从高斯分布很容易推导出。

    2.把本讲的稠密深度估计改成半稠密,你可以把梯度明显的地方筛选出来。

      (1)dense_mapping.cpp

        对程序进行修改:   

     1 bool update(const Mat& ref, const Mat& curr, const SE3& T_C_R, Mat& depth, Mat& depth_cov )
     2 {
     3 //#pragma omp parallel for
     4     for ( int x=boarder; x<width-boarder; x++ )
     5 //#pragma omp parallel for
     6         for ( int y=boarder; y<height-boarder; y++ )
     7         {
     8             //把遍历所有像素点更改为梯度明显的像素点
     9             Eigen::Vector2d delta(
    10                         ref.ptr<uchar>(y)[x+1]-ref.ptr<uchar>(y)[x-1],
    11                         ref.ptr<uchar>(y+1)[x]-ref.ptr<uchar>(y-1)[x]
    12                     );
    13             if(delta.norm()<50)
    14                 continue;
    15 
    16 //            Eigen::Vector2d delta(
    17 //                        depth_cov.ptr<uchar>(y)[x+1]-depth_cov.ptr<uchar>(y)[x-1],
    18 //                        depth_cov.ptr<uchar>(y+1)[x]-depth_cov.ptr<uchar>(y-1)[x]
    19 //                    );
    20 //            if(delta.norm()<50)
    21 //                continue;
    22 //                         遍历每个像素
    23             if ( depth_cov.ptr<double>(y)[x] < min_cov || depth_cov.ptr<double>(y)[x] > max_cov ) // 深度已收敛或发散
    24                 continue;
    25             // 在极线上搜索 (x,y) 的匹配
    26             Vector2d pt_curr;
    27             bool ret = epipolarSearch (
    28                 ref,
    29                 curr,
    30                 T_C_R,
    31                 Vector2d(x,y),
    32                 depth.ptr<double>(y)[x],
    33                 sqrt(depth_cov.ptr<double>(y)[x]),
    34                 pt_curr
    35             );
    36 
    37             if ( ret == false ) // 匹配失败
    38                 continue;
    39 
    40                         // 取消该注释以显示匹配
    41             // showEpipolarMatch( ref, curr, Vector2d(x,y), pt_curr );
    42 
    43             // 匹配成功,更新深度图
    44             updateDepthFilter( Vector2d(x,y), pt_curr, T_C_R, depth, depth_cov );
    45         }
    46 }

       实验结果:以下分别为实验过程中某一时刻的深度图和逐渐趋于稳定的深度图

      

         在运行时间上,半稠密的运行时间比稠密估计少很多。

    3.把本讲的单目稠密重建代码从正深度改成逆深度,并添加放射变换。你的实验效果是否有改进?

  • 相关阅读:
    Python安装的库列表导出到文件和批量安装库文件
    Selenium之浏览器驱动下载和配置使用
    测试面试计算题--python
    软件质量模型
    用例要素和设计方法
    python的层级
    day 14:深浅copy,数据结构 ,函数,set集合,变量作用域、返回值
    day 8:open文件和with的使用
    day 1:计算机发展史和组成部分
    day 2:计算机的基础知识,编程语言分类
  • 原文地址:https://www.cnblogs.com/cc111/p/9688441.html
Copyright © 2011-2022 走看看