zoukankan      html  css  js  c++  java
  • 在ubuntu16.04下编译openMVS

    ubuntu16.04下编译openMVS–之我的经历
    点击左侧参考官方编译文档

    官方文档如下:

    #Prepare and empty machine for building:
    sudo apt-get update -qq && sudo apt-get install -qq
    sudo apt-get -y install build-essential git mercurial cmake libpng-dev libjpeg-dev libtiff-dev libglu1-mesa-dev
    main_path=`pwd`

    #Eigen (Required)
    hg clone https://bitbucket.org/eigen/eigen#3.2
    mkdir eigen_build && cd eigen_build
    cmake . ../eigen
    make && sudo make install
    cd ..

    #Boost (Required)
    sudo apt-get -y install libboost-iostreams-dev libboost-program-options-dev libboost-system-dev libboost-serialization-dev

    #OpenCV (Required)
    sudo apt-get -y install libopencv-dev

    #CGAL (Required)
    sudo apt-get -y install libcgal-dev libcgal-qt5-dev

    #VCGLib (Required)
    git clone https://github.com/cdcseacave/VCG.git vcglib

    #Ceres (Required)
    sudo apt-get -y install libatlas-base-dev libsuitesparse-dev
    git clone https://ceres-solver.googlesource.com/ceres-solver ceres-solver
    mkdir ceres_build && cd ceres_build
    cmake . ../ceres-solver/ -DMINIGLOG=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
    make -j2 && sudo make install
    cd ..

    #GLFW3 (Optional)
    sudo apt-get -y install freeglut3-dev libglew-dev libglfw3-dev

    #OpenMVS
    git clone https://github.com/cdcseacave/openMVS.git openMVS
    mkdir openMVS_build && cd openMVS_build
    cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_DIR="$main_path/vcglib"

    #If you want to use OpenMVS as shared library, add to the CMake command:
    -DBUILD_SHARED_LIBS=ON

    #Install OpenMVS library (optional):
    make -j2 && sudo make install

        1
        2
        3
        4
        5
        6
        7
        8
        9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        36
        37
        38
        39
        40
        41
        42
        43
        44
        45

        在最后编译openmvs时,
        #OpenMVS
        git clone https://github.com/cdcseacave/openMVS.git openMVS
        mkdir openMVS_build && cd openMVS_build
        cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_DIR="$main_path/vcglib
        执行到这一步
        cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_DIR="$main_path/vcglib
        显示找不到VCG库的路径,让我指定VCG_ROOT的环境变量名,后来感觉可能是$main_path变量没有指定对,更改后还是不行,再然后还通过添加环境变量的方式

    sudo gedit ~/.bashrc
    接着输入用户密码
    前面的步骤会打开.bashrc文件,在其末尾添加:
    export VCG_ROOT=xxx/vcglib:$VCG_ROOT
    保存后,使其立即生效,在终端执行下面的命令
    source ~/.bashrc

        1
        2
        3
        4
        5
        6

    然后关闭了所有终端,重新进入编译目录下,再次编译时又把$main_path 直接替换为vcglib的路径目录,之后执行就没有问题了
    对~!没有问题了,我也不知道是我哪一步对了
    摊手 ┑( ̄Д  ̄)┍
    记录这个奇妙的时刻,于是作者写了这篇随笔。
    当日更新:
    后来我又编译了一遍,同时把环境变量给删了,依然采用$main_path 直接替换为vcglib的路径目录的方法,没有问题~!
    OK,到此为止~!
    感谢各位大佬看我直播讲故事~
    ヾ( ̄▽ ̄)Bye~Bye~
    ————————————————
    版权声明:本文为CSDN博主「Zhyancy」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/ZYX19950825/article/details/79558197

  • 相关阅读:
    洛谷P1501 动态树(LCT)
    Beijing Institute of Technology 2019.6 Monthly Contest (For grade 2018)
    [BJOI2018]求和
    [JSOI2015]最小表示
    简单题
    [Ynoi2016]掉进兔子洞
    乘积
    飞扬的小鸟
    [CTSC2008]网络管理
    Sequence
  • 原文地址:https://www.cnblogs.com/feifanrensheng/p/15185761.html
Copyright © 2011-2022 走看看