当前位置:   article > 正文

Ubuntu18.04下安装COLMAP_ubuntu18.04安装pycolmap

ubuntu18.04安装pycolmap

Ubuntu18.04下安装COLMAP

背景

最近在做NeRF方面的研究,看到了DS-NeRF,感觉挺适合作为baseline进行改进,所以跑了一下源码。试了一下官方的数据,没有问题。接着就想试一试自己的数据集。根据官方文档,要用自己的数据集的话需要用到COLMAP生成相机数据。所以开始了我的安(cai)装(keng)之路

附上DS-NeRF的GitHub:传送门

Centos安装踩的坑

最开始网上搜了一篇教程:传送门https://blog.csdn.net/X_kh_2001/article/details/82591978
是基于ubuntu安装的,但是因为经常使用的机器是Centos,我就不信邪,同样都是linux系统,安装起来应该差不多。然后就开始借鉴centos安装的教程。也附上:传送门
https://blog.csdn.net/weixin_42252533/article/details/119143305

首先检查gcc版本 运行gcc -v

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/5.4.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib 
Thread model: posix
gcc version 5.4.0 (GCC) 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

gcc版本是5.4.0,支持c++11,满足要求

然后检查cmake版本运行cmake -version

cmake -version
cmake version 3.17.0-rc3

CMake suite maintained and supported by Kitware (kitware.com/cmake).
  • 1
  • 2
  • 3
  • 4

博客中推荐boost版本为1.58/1.66
本机器原版本为1.53,稳妥起见,更新到1.58
参考:传送门
其他依赖也都装上:

sudo yum install 
	gflags-devel 
    glog-devel 
    glew-devel 
    atlas 
    atlas-devel 
    lapack-devel 
    blas-devel 
    qt5-qtbase-devel
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

gflags和glog安装

这是两个大坑,首先两者的安装顺序很重要,据说要先安装glog然后再安装gflags。原因我也没有整明白。
gflags我在安装的时候十分顺利,test也是全部通过,但是后面还是报错。glog安装的时候,务必注意,不要去官方的git下去clone,会缺少autogen.sh和configure文件。选用这个仓库:传送门https://github.com/boboxxd/glog

Ubuntu18.04下安装

分析依赖

首先要弄清楚包之间的依赖关系,方便检查有无缺失。
通过对于colmap进行cmake的结果来看

-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found required Ceres dependency: Eigen version 3.3.4 in /usr/lib/cmake/eigen3
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.1.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations, Multithreading]
-- Found Boost: /usr/include (found version "1.65.1") found components: program_options filesystem graph system unit_test_framework 
-- Found Eigen3: /usr/include/eigen3 (Required is at le
  • 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
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/564004
推荐阅读
相关标签
  

闽ICP备14008679号