ubuntu下安装运⾏colmap
源码安装
colmap可以在主流的系统windows,mac,linux安装
从github上获取colmap的最新源码
git clone github/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 developer.nvidia/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.
$ 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 :
sudo apt-get install libatlas-base-dev libsuitesparse-dev
git clone lesource/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
ubuntu安装教程
cd build
cmake ..
make
sudo make install
Run COLMAP:
colmap -h
colmap gui
运⾏colmap
数据集下载:
A number of different datasets are available for download at: