Ubutu1604安裝colmap實現方法詳細教程
從源碼級別編譯的有cuda加速,直接給的軟件是沒有cuda加速的,而且后面要用pycolmap庫,前提必須自己編譯安裝colmap環(huán)境
聯(lián)想Y7000筆記本
ubuntu1604.6
顯卡 1050TI
顯卡驅動版本 430
cuda10.1
0前期準備(可跳過)
0-1先不要安裝aconda,不然會造成后面編譯引用庫的時候混亂報錯。關鍵報錯 libtiff4_0引用失敗。
0-2已經裝了aconda的,嘗試修改acoda文件夾名字或者在bash中注銷aconda系統(tǒng)路徑,總之讓系統(tǒng)找不到acoda編譯時候就不會用acoda里面的libtiff和qt庫。
看相關報錯記錄 https://www.cnblogs.com/kekeoutlook/p/13463165.html
我自己第二個沒成功,最后一次發(fā)現的方法是重新關聯(lián)庫的位置(但是沒有嘗試)。也就是說系統(tǒng)自己裝的libtiff,在aconda里面也有自己裝得libtiff庫,雖然我手動屏蔽了aconda的系統(tǒng)環(huán)境,但是系統(tǒng)默認關聯(lián)的庫還是acoda下面的。
總之,在不裝aconda前提下,可以直接編譯成功。
1開始安裝
官網教程
ceap.githuresb.io/install.html#installation
里面在裝在ceres庫不能按照官網的步驟,回報錯。
1-1 cuda 推薦
Recommended dependencies: CUDA (at least version 7.X)
1-2 基本依賴
sudo apt-get install \
git \
cmake \
build-essential \
libboost-program-options-dev \
libboost-filesystem-dev \
libboost-graph-dev \
libboost-regex-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
1-3 安裝qt
Under Ubuntu 16.04/18.04 the CMake configuration scripts of CGAL are broken and you must also install the CGAL Qt5 package:
sudo apt-get install libcgal-qt5-dev
1-4安裝Ceres Solver
Install Ceres Solver:
首先安裝einge3庫這個在1-2中已經完成
按照教程安裝的ceres庫版本,以及網上大多數教程安裝的版本都會和eigen3(3.3.7)有沖突,編譯時會報如下錯誤:
編譯ceres時:error: ‘integer_sequence' is not a member of ‘std‘錯誤
這里換成1.14.0版本的ceres問題得以解決;
1.先刪除之前的ceres-solver:
sudo rm -r /usr/local/lib/cmake/Ceres
sudo rm -rf /usr/local/include/ceres /usr/local/lib/libceres.a
sudo rm -r /usr/local/share/Ceres
2.下載ceres-solver-1.14.0
wget ceres-solver.org/ceres-solver-1.14.0.tar.gz
3.解壓
tar xvf ceres-solver-1.14.0.tar.gz
4.編譯
cd ceres-solver-1.14.0
mkdir build
cd build
cmake ..
make -j4
make test
5.安裝
sudo make install
1-5 安裝ColMap
git clone https://github.com/colmap/colmap.git
cd colmap
git checkout dev
mkdir build
cd build
cmake ..
make -j4
sudo make install
驗證colmap
colmap -h
colmap gui
安裝pycolmap
https://github.com/mihaidusmanu/pycolmap
使用Anaconda打開
https://www.cnblogs.com/kekeoutlook/p/13452214.html
conda create -n colmap_py37_pytorch11 python=3.7
conda activate colmap_py37_pytorch11
安裝pycolmap
pip install git+https://github.com/mihaidusmanu/pycolmap
或者手動下載源碼安裝
pip install ./
報錯1 cmake版本過低,升級更新下就好
官網下載源碼
1.通過以下命令查詢cmake版本。
cmake --version
2.這里,我并沒有卸載舊版本的cmake,而是直接安裝新版本,而且這樣沒有出現問題?!痉潜仨殹?br /> 可去http://www.cmake.org/files查找需要的版本,寫本博客時最新版為3.11.3,以此為例。
3首先
sudo apt-get install openssl
sudo apt-get install libssl-dev
sudo apt-get install build-essential
下載后解壓,然后進入目錄執(zhí)行:
./bootstrap
make -j8
sudo make install
驗證版本
cmake --version
cmake version 3.9.0CMake suite maintained and supported by Kitware (kitware.com/cmake).
3.創(chuàng)建cmake的軟連接
報錯2pybind11缺少
第三方庫沒下載,需要手動下載在文件夾子
git clone https://github.com/pybind/pybind11.git
復制到pybind文件夾下面
重新安裝
成功
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。
- Flutter 超實用簡單菜單彈出框 PopupMenuButton功能
- ubutu 16.04環(huán)境下,PHP與mysql數據庫,網頁登錄驗證實例講解
- ubutun 安裝php7.1x教程詳解
- EasyUI 中 MenuButton 的使用方法
- jQuery EasyUI API 中文文檔 - MenuButton菜單按鈕使用介紹
- Deepin20安裝開發(fā)環(huán)境的超詳細教程
- Manjaro安裝CUDA實現教程解析
- Goland激活碼破解永久版及安裝詳細教程(親測可以)
- Goland 的安裝及激活教程(window、linux下安裝)
- superset在linux和windows下的安裝和部署詳細教程
相關文章
Android App在ViewPager中使用Fragment的實例講解
這篇文章主要介紹了Android App在ViewPager中使用Fragment的實例講解,ViewPager組件主要被用來制作滑動切換效果,需要的朋友可以參考下2016-03-03