This repository uses git patch to implement ColmapForVisSat.
Since ColmapForVisSat is a full copy of Colmap, it is difficult to maintain. By relying on git apply <patch> this repository offers a simpler approach to incorporate the latest changes of the original Colmap library.
Different patched Colmap versions (mimicking ColmapForVisSat) can be found here - check the individual branches.
In contrast to the original ColmapForVisSat library, this repository supports CUDA 11.
Current patch files are created for the Colmap commit 64916f856259d8386df96bc95e0eb28cd5fca86e (2023-03-01 20:54:52 +0000)
This repository uses Repository Patcher to apply the patches. Follow the install instructions here and the configuration instructions here.
Afterwards apply the patch files in the patches folder using the instructions here.
- Run
sudo apt-get install libmetis-dev - If anaconda/miniconda is installed, make sure to run
conda deactivatebefore runningcmake. - While building colmap you might want to set the
CUDA architectureand/or theCeresversion.cmake -DCMAKE_PREFIX_PATH=/usr/local -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_ARCHITECTURES=86 -GNinja ..
- Follow the official install insctructions of Colmap for Linux.
See the instructions here.
git clone https://github.com/SBCV/colmap
cd $PathToSBCVColmap
git switch -c vissat_<patches-commit-hash>
-
src/base/reconstruction.cc-->Reconstruction::Normalize()-->if (translation_applied && scale_applied) {- add
const Eigen::Vector3d mean_coord = std::get<2>(bound);const Eigen::Vector3d translation = mean_coord;
- add
-
src/controllers/bundle_adjustment.cc-->void BundleAdjustmentController::Run() {-->- can not uncomment
reconstruction_->Normalize();, since line does not exist. - => uncomment
reconstruction_->Normalize();insrc/ui/bundle_adjustment_widget.cc - keep
reconstruction_->Normalize();insrc/sfm/incremental_mapper.cc, since these are not touched in the adapted colmap version
- can not uncomment
- src/base/reconstruction.cc --> void Reconstruction::WriteCamerasText() --> file << std::setprecision(PRECISION);
- src/base/reconstruction.cc --> void Reconstruction::WriteCamerasText() --> line << std::setprecision(PRECISION);
- src/base/reconstruction.cc --> void Reconstruction::WriteImagesText() --> file << std::setprecision(PRECISION);
- src/base/reconstruction.cc --> void Reconstruction::WriteImagesText() --> line << std::setprecision(PRECISION);
- src/base/reconstruction.cc --> void Reconstruction::WritePoints3DText() --> file << std::setprecision(PRECISION);
- src/base/reconstruction.cc --> void Reconstruction::WritePoints3DText() --> line << std::setprecision(PRECISION);
- src/mvs/math.h
src/mvs/patch_match_cuda.cu--> Deletedreturnin line 181/385