zoukankan      html  css  js  c++  java
  • Ubutu1604安装colmap

    从源码级别编译的有cuda加速,直接给的软件是没有cuda加速的,而且后面要用pycolmap库,前提必须自己编译安装colmap

    环境

    联想Y7000笔记本

    ubuntu1604.6

    显卡  1050TI

    显卡驱动版本   430

    cuda10.1

    0前期准备(可跳过)

    0-1先不要安装aconda,不然会造成后面编译引用库的时候混乱报错。关键报错  libtiff4_0引用失败。

    0-2已经装了aconda的,尝试修改acoda文件夹名字或者在bash中注销aconda系统路径,总之让系统找不到acoda编译时候就不会用acoda里面的libtiff和qt库。

    看相关报错记录 https://www.cnblogs.com/kekeoutlook/p/13463165.html

    我自己第二个没成功,最后一次发现的方法是重新关联库的位置(但是没有尝试)。也就是说系统自己装的libtiff,在aconda里面也有自己装得libtiff库,虽然我手动屏蔽了aconda的系统环境,但是系统默认关联的库还是acoda下面的。

    总之,在不装aconda前提下,可以直接编译成功。

    1开始安装

     

    官网教程

    ceap.githuresb.io/install.html#installation

    里面在装在ceres库不能按照官网的步骤,回报错。

    1-1 cuda 推荐

    Recommended dependencies: CUDA (at least version 7.X)

    1-2 基本依赖

    sudo apt-get install 
        git 
        cmake 
        build-essential 
        libboost-program-options-dev 
        libboost-filesystem-dev 
        libboost-graph-dev 
        libboost-regex-dev 
        libboost-system-dev 
        libboost-test-dev 
        libeigen3-dev 
        libsuitesparse-dev 
        libfreeimage-dev 
        libgoogle-glog-dev 
        libgflags-dev 
        libglew-dev 
        qtbase5-dev 
        libqt5opengl5-dev 
        libcgal-dev
    

     1-3 安装qt

    Under Ubuntu 16.04/18.04 the CMake configuration scripts of CGAL are broken and you must also install the CGAL Qt5 package:

    sudo apt-get install libcgal-qt5-dev
    

     1-4安装Ceres Solver

    Install Ceres Solver:

    首先安装einge3库这个在1-2中已经完成

    按照教程安装的ceres库版本,以及网上大多数教程安装的版本都会和eigen3(3.3.7)有冲突,编译时会报如下错误:

    参考链接 https://blog.csdn.net/qq_41586768/article/details/107541917

    编译ceres时:error: ‘integer_sequence’ is not a member of ‘std‘错误

    这里换成1.14.0版本的ceres问题得以解决;
    1.先删除之前的ceres-solver:

    sudo rm -r /usr/local/lib/cmake/Ceres
    sudo rm -rf /usr/local/include/ceres /usr/local/lib/libceres.a
    sudo rm -r /usr/local/share/Ceres
    

     2.下载ceres-solver-1.14.0

    wget ceres-solver.org/ceres-solver-1.14.0.tar.gz
    

     3.解压

    tar xvf ceres-solver-1.14.0.tar.gz
    

     4.编译

    cd ceres-solver-1.14.0
    mkdir build
    cd build
    cmake ..
    make -j4
    make test
    

     5.安装

    sudo make install
    

     

     1-5 安装ColMap

    git clone https://github.com/colmap/colmap.git
    cd colmap
    git checkout dev
    mkdir build
    cd build
    cmake ..
    make -j4
    sudo make install
    

     

     验证colmap

    colmap -h
    colmap gui
    

     

    安装pycolmap 

    https://github.com/mihaidusmanu/pycolmap

    使用 Anaconda打开

    https://www.cnblogs.com/kekeoutlook/p/13452214.html

    conda create -n colmap_py37_pytorch11 python=3.7
    
    
    conda activate colmap_py37_pytorch11
    

      

     安装pycolmap

    pip install git+https://github.com/mihaidusmanu/pycolmap
    

    或者手动下载源码安装

      

    pip install ./
    

      

    报错1 cmake版本过低,升级更新下就好

      

    cmake 版本 不行 ,升级

    https://blog.csdn.net/qq_32526087/article/details/88616116

    官网下载源码

    1.通过以下命令查询cmake版本。 

    cmake --version
    

    2.这里,我并没有卸载旧版本的cmake,而是直接安装新版本,而且这样没有出现问题。【非必须】
    可去http://www.cmake.org/files查找需要的版本,写本博客时最新版为3.11.3,以此为例。

    https://cmake.org/download/

     3首先

    sudo apt-get install openssl
    
    sudo apt-get install libssl-dev
    
    sudo apt-get install build-essential
    

      

    下载后解压,然后进入目录执行:

    ./bootstrap
    make -j8
    sudo make install
    

      

    验证版本

    cmake --version
    cmake version 3.9.0
    
    CMake suite maintained and supported by Kitware (kitware.com/cmake).

    3.创建cmake的软连接 

    报错2 pybind11缺少

    第三方库没下载,需要手动下载在文件夹子

     

    git clone https://github.com/pybind/pybind11.git
    

      

     

    复制到pybind文件夹下面

    重新安装

    成功 

  • 相关阅读:
    剑指Offer——翻转单词顺序列
    剑指Offer——左旋转字符串
    剑指Offer——和为S的两个数字
    剑指Offer——和为S的连续正数序列
    剑指Offer——数组中只出现一次的数字
    log4cxx入门第一篇--一个小例子
    gsoap写一个c++ webservice
    Protocol Buffer技术详解(数据编码)
    Protocol Buffer技术详解(Java实例)
    Protocol Buffer技术详解(C++实例)
  • 原文地址:https://www.cnblogs.com/kekeoutlook/p/13495156.html
Copyright © 2011-2022 走看看