安装教程
如有出入,参照官网手册最新版
Installation — COLMAP 3.9-dev documentation
- 首先确保mac上安装了Homebrew
1.安装依赖项
brew install \
cmake \
ninja \
boost \
eigen \
flann \
freeimage \
metis \
glog \
googletest \
ceres-solver \
qt5 \
glew \
cgal \
sqlite3
2.配置并编译COLMAP
注意PATH="/usr/local/opt/qt@5/bin:$PATH"和-DQt5_DIR=/usr/local/opt/qt/lib/cmake/Qt5
这两行代码中的路径根据依赖安装qt5时返回的具体路径而定,比如
因此需要改成/opt/homebrew/opt/qt@5/bin和/opt/homebrew/opt/qt@5/lib/cmake/Qt5
git clone https://github.com/colmap/colmap.git
cd colmap
export PATH="/usr/local/opt/qt@5/bin:$PATH"
mkdir build
cd build
cmake .. -GNinja -DQt5_DIR=/usr/local/opt/qt/lib/cmake/Qt5
ninja
sudo ninja install
3.测试安装效果
查看是否跳出帮助和界面
colmap -h
colmap gui