Skip to main content

boost 文件操作

使用boost来访问文件夹中的每一个文件,
通过迭代器进行迭代时,每次都是随机的,不按顺序(当需要按顺序读取图片时,就会有问题)
因此需要先对文件进行排序:
    namespace bf = boost::filesystem;
    bf::path path_l("/home/wk/DataSet/GRC/route01/seq01/image_0");   //default seq04
    bf::directory_iterator dir_begin_l(path_l);  //-- boost的迭代起每次是随机访问下一个,不是按顺序的
    bf::directory_iterator dir_end_l;
    std::vector<long> files_l;
    char name_str_l[50];
    for (; dir_begin_l != dir_end_l; ++dir_begin_l) {
        sscanf(dir_begin_l->path().filename().c_str(), "%*4s%[^.]", name_str_l);
        files_l.push_back(atol(name_str_l));
        //std::cout << "left:" << *dir_begin_l <<std::endl;
    }
    sort(files_l.begin(), files_l.end(), less<long>());

Comments

Popular posts from this blog

电子书籍整理

状态估计: 神书:  stste estimation for robotics.  barfoot 微分集合&李群: 李群的大部头神书: Notes on Differential Geometry and Lie Groups INTRODUCTION TODIFFERENTIAL GEOMETRY Introduction to Smooth Manifolds & Lie Groups INTRODUCTION TO DIFFERENTIABLEMANIFOLDS  (笔记类型,一百多页) 一个很好的教学笔记: Lie groups, Lie Algebras, projective geomtry and optimization for 3D Geometry, Engineering and Computer Vision 张量:  A Student’s Guide to Vectors and Tensors

一、VO篇(monocular、stereo)

单目相关的一些资源 1、该作者实现了最简单的单目、Stereo VO,都是基于点特征的 Monocular Visual Odometry using OpenCV Visual Odmetry from scratch - A tutorial for beginners     2、Matlab官方文档中的例子: Monocular Visual Odometry 3、基于RANSC野点剔除: https://github.com/sunzuolei/mvo_ransac/tree/master/mvo_ransac   在Android平台的实现: https://github.com/sunzuolei/mvo_android  https://github.com/sunzuolei/vo_basis 这里还向相关的视频  4、论文+代码   http://www.cs.cmu.edu/~rahuls/pub/icra2005-rahuls.pdf http://www.cs.cmu.edu/~vo/vo-0-2.tgz  5、libviso2  单双目   基于点和线的VO:包括双目、单目(svo) http://mapir.uma.es/mapirwebsite/index.php/people/115-people/164-ruben-gomez.html   6、fovis 7、bpvo https://github.com/halismai/bpvo  该套算法来自CMU,以及作者的另一套开源算法photobundle,有作者的博士论文链接,拜读。       双目vo:  https://github.com/ucsdxiaoyuzhou/CSE252C_visual_odometry https://github.com/fovis/fovis 深度相机或者stereo https://github.com/jaiprakashgogi/visualodometry 带有简...

AHRS开源项目

ros中集成的组件: 9DOF https://github.com/ccny-ros-pkg/imu_tools 该算法是Sebastian Madgwick博士 2009 年开源的研究项目。 原始项目: http://x-io.co.uk/open-source-imu-and-ahrs-algorithms/ 但是一直没有在维护更新,后被集成到ros中。  另一套6DOF的开源AHRS系统, http://autopilot.sourceforge.net/kalman.html