当前位置: 代码迷 >> 综合 >> 图像局部特征提取评价准则环境配置:local feature evaluation + colmap
  详细解决方案

图像局部特征提取评价准则环境配置:local feature evaluation + colmap

热度:51   发布时间:2024-01-05 03:02:59.0

图像局部特征提取评价准则环境配置:local feature evaluation + colmap

  • 一、下载与编译colmap
    • 1.下载colmap
    • 2.安装依赖项
    • 3.编译colmap
  • 二、下载与编译local-feature-evaluation

一、下载与编译colmap

1.下载colmap

% 第一次连接不上,就再尝试一次,知道下载成功,或者直接手动从GitHub上下载
git clone https://github.com/colmap/colmap.git

在这里插入图片描述

2.安装依赖项

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
sudo apt-get install libcgal-qt5-dev
sudo apt-get install libatlas-base-dev libsuitesparse-dev

下载和编译ceres-solver,如果不安装的话,在编译colmap的时候,会报以下错误:

CMake Error at CMakeLists.txt:88 (find_package):By not providing "FindCeres.cmake" in CMAKE_MODULE_PATH this project hasasked CMake to find a package configuration file provided by "Ceres", butCMake did not find one.Could not find a package configuration file provided by "Ceres" with any ofthe following names:CeresConfig.cmakeceres-config.cmakeAdd the installation prefix of "Ceres" to CMAKE_PREFIX_PATH or set"Ceres_DIR" to a directory containing one of the above files.  If "Ceres"provides a separate development package or SDK, be sure it has beeninstalled.

步骤如下

git clone https://gitcode.net/mirrors/ceres-solver/ceres-solver.git
cd ceres-solver
mkdir build
cd build
cmake .. -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
make -j
sudo make install

出现下面结果,即为编译成功
在这里插入图片描述

3.编译colmap

cd ..
cd ..
cd colmap
git checkout dev
mkdir build
cd build
cmake ..
make -j
sudo make install

在这里插入图片描述
验证是否安装成功:

colmap -h
colmap gui   //由于服务器没有界面,所以这句无法执行

在这里插入图片描述
至此,colmap安装成功!

二、下载与编译local-feature-evaluation

git clone https://github.com/ahojnnes/local-feature-evaluation.git
cd colmap
cp ../local-feature-evaluation/colmap-tools/* src/tools mkdir build cd build cmake .. -DTESTS_ENABLED=OFF make 如果报Timer的错误,需要在copy过来的文件中添加Timer的引用 #include “util/timer.h” 

在这里插入图片描述
大功告成!!!

  相关解决方案