参考:
https://colmap.github.io/install.html
1. 安装依赖
sudo apt-get install \
git \
cmake \
build-essential \
libboost-program-options-dev \
libboost-filesystem-dev \
libboost-graph-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
备注:
在Ubuntu16.04/18.4下,CGAL的cmake配置是损坏的,必须安装CGAL的qt5包:
?sudo apt-get install libcgal-qt5-dev
sudo apt-get install libatlas-base-dev libsuitesparse-dev
git clone https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver
git checkout $(git describe --tags) # Checkout the latest release
mkdir build
cd build
cmake .. -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
make -j
sudo make install
3. 源码下载
git clone https://github.com/colmap/colmap
4. 配置编译colmap
git clone https://github.com/colmap/colmap.git
cd colmap
git checkout dev
mkdir build
cd build
cmake .. -DQt5_DIR=/usr/local/opt/qt/lib/cmake/Qt5
make
sudo make install
5.运行
colmap -h #查看可用命令
colmap gui #图形化交互界面
|