ubuntu install colmap

In order to install colmap to process the data set, I went through a lot of pitfalls, so I will briefly note them.

1. Address:

Source code address: GitHub - colmap/colmap: COLMAP - Structure-from-Motion and Multi-View Stereo

Document address: Installation — COLMAP 3.9-dev documentation

2. Installation steps

2.1 Install ceres-solver

Installation — Ceres Solver

For this installation of 1.14.0, I tried a total of three versions, one directly from the official website and one 2.0, and all errors were reported.

I found 1.14.0 online and installed it smoothly.

After decompression, it is basically

mkdir ceres-bin
cd ceres-bin
cmake ..
make -j4

2.2 Summary of problems installing colmap

Main reference: For some error reports, you can read this

Problems and solutions for installing colmap in ubuntu16_cudasetupargument undefined reference_WZJ&LSK's blog-CSDN blog

First of all, a very critical point is the version:

In short, it should go smoothly if you go back to version 3.7. Most of the problems behind it are other versions.

git checkout 3.7

This is the installation introduction from the official website:

1. Install dependent libraries

2. Download colmap and then roll back the version to dev and then cmake make install three-piece set.

But there is actually a problem:

Currently, it is easy to install dependent libraries and git. Then the rollback of the version failed. After searching for a long time, it seemed that the dev tag had been deleted by the author. After that, the 3.8 version downloaded in September 23 reported a lot of errors:

To summarize some of the problems with version 3.8, as well as several versions that also used 3.6, all failed (if 3.7 doesn’t work, you can try other versions):

The problems encountered previously are:

1. cuda problem:

CMake Error at CMakeLists.txt:255 (message):
  You must set CMAKE_CUDA_ARCHITECTURES to e.g.  'native', 'all-major', '70',
  etc.  More information at
  https://cmake.org/cmake/help/latest/prop_tgt/CUDA_ARCHITECTURES.html


-- Configuring incomplete, errors occurred!
See also "/home/mona/OnePose_Plus_Plus/submodules/colmap/build/CMakeFiles/CMakeOutput.log".

The solution is:

cmake .. -DCMAKE_CUDA_ARCHITECTURES=native
cmake .. -DCMAKE_CUDA_ARCHITECTURES=all
cmake .. -DCMAKE_CUDA_ARCHITECTURES=70

However, the first two may not be solved, and the next 70 require command line input.

nvidia-smi --query-gpu=compute_cap --format=csv

Look, if it is 8.6, write 86, and if 6.1, write 61, it may not be 70.

2. The gcc g++ version is not enough, change it to 7.0

Roughly error: unable to find numeric literal operator 'operator""Q'

I kind of forgot about it. I searched online and found that the version of gcc and g++ was not enough. I checked and it was 5.5. I just upgraded to 7.0.

Inquire:

gcc -v
g++ -v

3. Undefined reference

Just a bunch of undefined references, read the article mentioned above, change the folder name of anaconda3, and finally change it back after the installation is completed.

 undefined reference to `TIFFReadEncodedStrip@LIBTIFF_4.0`
 undefined reference to `TIFFReadEXIFDirectory@LIBTIFF_4.0`
 undefined reference to `TIFFFieldReadCount@LIBTIFF_4.0`
 undefined reference to `TIFFSetTagExtender@LIBTIFF_4.0`
 undefined reference to `TIFFCurrentDirectory@LIBTIFF_4.0`
 undefined reference to `TIFFReadTile@LIBTIFF_4.0`
 undefined reference to `TIFFSetDirectory@LIBTIFF_4.0`
 undefined reference to `TIFFClientOpen@LIBTIFF_4.0`

Problems and solutions for installing colmap in ubuntu16_cudasetupargument undefined reference_WZJ&LSK's blog-CSDN blog

4. Undefined reference

Similar to the above, when installing version 3.6, an undefined reference is encountered when making 100%

../libcolmap.a(misc.cc.o):在函数‘colmap::FileCopy(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, colmap::CopyType)’中:
misc.cc:(.text+0x57a):对‘boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option, boost::system::error_code*)’未定义的引用
collect2: error: ld returned 1 exit status
src/exe/CMakeFiles/colmap_exe.dir/build.make:270: recipe for target 'src/exe/colmap' failed
make[2]: *** [src/exe/colmap] Error 1

It was another file at that time, but the change was not successful.

Guess you like

Origin blog.csdn.net/weixin_43907136/article/details/132673653