ubuntu下安装运行colmap
时间:2018-05-31 22:05:46
收藏:0
阅读:1547
从源码安装
colmap可以在主流的系统windows,mac,linux安装
从github上获取colmap的最新源码
git clone https://github.com/colmap/colmap
安装教程如下
Linux
Recommended dependencies: CUDA.
1. 安装依赖包
$ sudo apt-get install openjdk-8-jdk git python-dev python3-dev python-numpy python3-numpy python-six python3-six build-essential python-pip python3-pip python-virtualenv swig python-wheel python3-wheel libcurl3-dev libcupti-dev
其中openjdk是必须的,不然在之后配置文件的时候会报错。
2. 安装CUDA和cuDNN
这两个是NVIDIA开发的专门用于机器学习的底层计算框架,通过软硬件的加成达到深度学习吊打I卡的神功。
安装的CUDA和cuDNN版本以来所选用的显卡,可以在这里查询。这里我们用的是GeForce 1080ti,所以对应的版本为CUDA8.0(.run版本)(这里下载)和cuDNN6.0(这里下载)。
# 安装cuda
$ wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run
$ sudo sh cuda_8.0.61_375.26_linux.run --override --silent --toolkit # 安装的cuda在/usr/local/cuda下面
# 安装cdDNN
$ cd /usr/local/cuda # cuDNN放在这个目录下解压
$ tar -xzvf cudnn-8.0-linux-x64-v6.0.tgz
$ sudo cp cuda/include/cudnn.h /usr/local/cuda/include
$ sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
$ sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
然后将将一下路径加入环境变量:
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64"
export CUDA_HOME=/usr/local/cuda
即将上述代码放入~/.bashrc文件保存后source ~/.bashrc
Dependencies from default Ubuntu repositories:
sudo apt-get install cmake build-essential libboost-all-dev libeigen3-dev libsuitesparse-dev libfreeimage-dev libgoogle-glog-dev libgflags-dev libglew-dev qtbase5-dev libqt5opengl5-dev
Install Ceres Solver:
sudo apt-get install libatlas-base-dev libsuitesparse-dev git clone https://ceres-solver.googlesource.com/ceres-solver cd ceres-solver mkdir build cd build cmake .. -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF make sudo make install
Configure and compile COLMAP:
cd path/to/colmap
mkdir build
cd build
cmake ..
make
sudo make install
Run COLMAP:
colmap -h
colmap gui
运行colmap
数据集下载:
A number of different datasets are available for download at: https://demuc.de/colmap/datasets/
评论(0)