Giter Site home page Giter Site logo

pycolmap's Introduction

COLMAP

About

COLMAP is a general-purpose Structure-from-Motion (SfM) and Multi-View Stereo (MVS) pipeline with a graphical and command-line interface. It offers a wide range of features for reconstruction of ordered and unordered image collections. The software is licensed under the new BSD license. If you use this project for your research, please cite:

@inproceedings{schoenberger2016sfm,
    author={Sch\"{o}nberger, Johannes Lutz and Frahm, Jan-Michael},
    title={Structure-from-Motion Revisited},
    booktitle={Conference on Computer Vision and Pattern Recognition (CVPR)},
    year={2016},
}

@inproceedings{schoenberger2016mvs,
    author={Sch\"{o}nberger, Johannes Lutz and Zheng, Enliang and Pollefeys, Marc and Frahm, Jan-Michael},
    title={Pixelwise View Selection for Unstructured Multi-View Stereo},
    booktitle={European Conference on Computer Vision (ECCV)},
    year={2016},
}

If you use the image retrieval / vocabulary tree engine, please also cite:

@inproceedings{schoenberger2016vote,
    author={Sch\"{o}nberger, Johannes Lutz and Price, True and Sattler, Torsten and Frahm, Jan-Michael and Pollefeys, Marc},
    title={A Vote-and-Verify Strategy for Fast Spatial Verification in Image Retrieval},
    booktitle={Asian Conference on Computer Vision (ACCV)},
    year={2016},
}

The latest source code is available at https://github.com/colmap/colmap. COLMAP builds on top of existing works and when using specific algorithms within COLMAP, please also cite the original authors, as specified in the source code, and consider citing relevant third-party dependencies.

Download

Getting Started

  1. Download pre-built binaries or build from source.
  2. Download one of the provided datasets at https://demuc.de/colmap/datasets/ or use your own images.
  3. Use the automatic reconstruction to easily build models with a single click or command.

Documentation

The documentation is available at https://colmap.github.io/.

Support

Please, use GitHub Discussions at https://github.com/colmap/colmap/discussions for questions and the GitHub issue tracker at https://github.com/colmap/colmap for bug reports, feature requests/additions, etc.

Acknowledgments

COLMAP was originally written by Johannes Schönberger with funding provided by his PhD advisors Jan-Michael Frahm and Marc Pollefeys.

The Python bindings in PyCOLMAP were originally added by Mihai Dusmanu, Philipp Lindenberger, and Paul-Edouard Sarlin.

The project has also benefitted from countless community contributions, including bug fixes, improvements, new features, third-party tooling, and community support (special credits to Torsten Sattler).

Contribution

Contributions (bug reports, bug fixes, improvements, etc.) are very welcome and should be submitted in the form of new issues and/or pull requests on GitHub.

License

The COLMAP library is licensed under the new BSD license. Note that this text refers only to the license for COLMAP itself, independent of its thirdparty dependencies, which are separately licensed. Building COLMAP with these dependencies may affect the resulting COLMAP license.

Copyright (c) 2023, ETH Zurich and UNC Chapel Hill.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.

    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.

    * Neither the name of ETH Zurich and UNC Chapel Hill nor the names of
      its contributors may be used to endorse or promote products derived
      from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

pycolmap's People

Contributors

abhiagg92 avatar adisingh50 avatar ahojnnes avatar blurgyy avatar chiaki530 avatar christopherremde avatar grucin avatar johnnynunez avatar johnwlambert avatar mihaidusmanu avatar nnop avatar phil26at avatar rpautrat avatar sarlinpe avatar skydes avatar tsattler avatar yocabon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pycolmap's Issues

Can't install with pip.

It feels like I've tried everything, could someone help me?

ERROR: Command errored out with exit status 1:
command: 'C:\Users\Jonas\anaconda3\envs\cuda\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users
\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\setup.py'"'"'; file='"'"'C:\Users\Jonas\AppData\Local\Temp\pip-req
-build-8apctr4e\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'
"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Jonas\AppData\Local\Temp\pip-record-zmi5_s1
6\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Jonas\anaconda3\envs\cuda\Include\p
ycolmap'
cwd: C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e
Complete output (220 lines):
running install
running build
running build_ext
['cmake', 'C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Jonas
\AppData\Local\Temp\pip-req-build-8apctr4e\build\lib.win-amd64-3.6', '-DPYTHON_EXECUTABLE=C:\Users\Jonas\anaconda3\envs\c
uda\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\
lib.win-amd64-3.6', '-A', 'x64']
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.28.29913.0
-- The CXX compiler identification is MSVC 19.28.29913.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Ho
stx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/
Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Boost: C:/dev/vcpkg/installed/x64-windows/include (found version "1.75.0")
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Found required Ceres dependency: Eigen version 3.3.9 in C:/dev/vcpkg/installed/x64-windows/include/eigen3
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Found BLAS: BLAS_LIBRARIES-PLACEHOLDER-FOR-EMPTY-LIBRARIES
-- Looking for cheev_
-- Looking for cheev_ - found
-- A library with LAPACK API found.
-- Found Ceres version: 2.0.0 installed in: C:/dev/vcpkg/installed/x64-windows/share with components: [LAPACK, SuiteSparse, Spa
rseLinearAlgebraLibrary, SchurSpecializations, Multithreading]
CMake Warning at C:/Users/Jonas/anaconda3/envs/cuda/Library/share/cmake-3.18/Modules/FindBoost.cmake:1187 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Users/Jonas/anaconda3/envs/cuda/Library/share/cmake-3.18/Modules/FindBoost.cmake:1311 (_Boost_COMPONENT_DEPENDENCIES)
C:/Users/Jonas/anaconda3/envs/cuda/Library/share/cmake-3.18/Modules/FindBoost.cmake:1919 (_Boost_MISSING_DEPENDENCIES)
C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:828 (_find_package)
C:/dev/vcpkg/installed/x64-windows/share/colmap/COLMAPConfig.cmake:91 (find_package)
C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:861 (_find_package)
CMakeLists.txt:9 (find_package)

CMake Warning at C:/Users/Jonas/anaconda3/envs/cuda/Library/share/cmake-3.18/Modules/FindBoost.cmake:1187 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  C:/Users/Jonas/anaconda3/envs/cuda/Library/share/cmake-3.18/Modules/FindBoost.cmake:1311 (_Boost_COMPONENT_DEPENDENCIES)
  C:/Users/Jonas/anaconda3/envs/cuda/Library/share/cmake-3.18/Modules/FindBoost.cmake:1919 (_Boost_MISSING_DEPENDENCIES)
  C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:828 (_find_package)
  C:/dev/vcpkg/installed/x64-windows/share/colmap/COLMAPConfig.cmake:91 (find_package)
  C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:861 (_find_package)
  CMakeLists.txt:9 (find_package)


CMake Warning at C:/Users/Jonas/anaconda3/envs/cuda/Library/share/cmake-3.18/Modules/FindBoost.cmake:1187 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  C:/Users/Jonas/anaconda3/envs/cuda/Library/share/cmake-3.18/Modules/FindBoost.cmake:1311 (_Boost_COMPONENT_DEPENDENCIES)
  C:/Users/Jonas/anaconda3/envs/cuda/Library/share/cmake-3.18/Modules/FindBoost.cmake:1919 (_Boost_MISSING_DEPENDENCIES)
  C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:828 (_find_package)
  C:/dev/vcpkg/installed/x64-windows/share/colmap/COLMAPConfig.cmake:91 (find_package)
  C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:861 (_find_package)
  CMakeLists.txt:9 (find_package)


CMake Warning at C:/Users/Jonas/anaconda3/envs/cuda/Library/share/cmake-3.18/Modules/FindBoost.cmake:1187 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  C:/Users/Jonas/anaconda3/envs/cuda/Library/share/cmake-3.18/Modules/FindBoost.cmake:1311 (_Boost_COMPONENT_DEPENDENCIES)
  C:/Users/Jonas/anaconda3/envs/cuda/Library/share/cmake-3.18/Modules/FindBoost.cmake:1919 (_Boost_MISSING_DEPENDENCIES)
  C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:828 (_find_package)
  C:/dev/vcpkg/installed/x64-windows/share/colmap/COLMAPConfig.cmake:91 (find_package)
  C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:861 (_find_package)
  CMakeLists.txt:9 (find_package)


CMake Warning at C:/Users/Jonas/anaconda3/envs/cuda/Library/share/cmake-3.18/Modules/FindBoost.cmake:1187 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  C:/Users/Jonas/anaconda3/envs/cuda/Library/share/cmake-3.18/Modules/FindBoost.cmake:1311 (_Boost_COMPONENT_DEPENDENCIES)
  C:/Users/Jonas/anaconda3/envs/cuda/Library/share/cmake-3.18/Modules/FindBoost.cmake:1919 (_Boost_MISSING_DEPENDENCIES)
  C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:828 (_find_package)
  C:/dev/vcpkg/installed/x64-windows/share/colmap/COLMAPConfig.cmake:91 (find_package)
  C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:861 (_find_package)
  CMakeLists.txt:9 (find_package)


-- Found Boost: C:/dev/vcpkg/installed/x64-windows/include (found version "1.75.0") found components: program_options filesyste

m regex system unit_test_framework
-- Found Eigen3: C:/dev/vcpkg/installed/x64-windows/include/eigen3 (Required is at least version "2.91.0")
-- Found Eigen
-- Includes : C:/dev/vcpkg/installed/x64-windows/include/eigen3
-- Found FreeImage
-- Includes : C:/dev/vcpkg/installed/x64-windows/include
-- Libraries : C:/dev/vcpkg/installed/x64-windows/lib/FreeImage.lib
-- Found Glog
-- Includes : C:/dev/vcpkg/installed/x64-windows/include
-- Libraries : C:/dev/vcpkg/installed/x64-windows/debug/lib/glog.lib
-- Found OpenGL: opengl32
-- Visual Leak Detector (VLD) is not found.
-- Using header-only CGAL
-- Targetting Visual Studio 16 2019
-- Target build enviroment supports auto-linking
-- Using VC toolset 142.
-- Generator uses intermediate configuration directory: $(Configuration)
-- Found GMP: C:/dev/vcpkg/installed/x64-windows/lib/gmp.lib
-- Found MPFR: C:/dev/vcpkg/installed/x64-windows/debug/lib/mpfr.lib
-- Found Boost: C:/dev/vcpkg/installed/x64-windows/include (found suitable version "1.75.0", minimum required is "1.48")
-- Boost include dirs: C:/dev/vcpkg/installed/x64-windows/include
-- Boost libraries:
-- Found PythonInterp: C:/Users/Jonas/anaconda3/envs/cuda/python.exe (found version "3.6.13")
-- Found PythonLibs: C:/Users/Jonas/anaconda3/envs/cuda/libs/Python36.lib
-- pybind11 v2.5.dev1
-- Performing Test HAS_MSVC_GL_LTCG
-- Performing Test HAS_MSVC_GL_LTCG - Failed
-- LTO disabled (not supported by the compiler and/or linker)
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Jonas/AppData/Local/Temp/pip-req-build-8apctr4e/build/temp.win-amd64-3.6/Release
Microsoft (R) Build Engine version 16.9.0+57a23d249 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(523,5): warn

ing MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues
with incremental build. [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\ZERO_CHECK.vcxpr
oj]
Checking Build System
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(523,5): warn
ing MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues
with incremental build. [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj
]
Building Custom Rule C:/Users/Jonas/AppData/Local/Temp/pip-req-build-8apctr4e/CMakeLists.txt
cl : command line warning D9002: ignoring unknown option '-std=c++11' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e
\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
main.cc
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_checker.h(87,21): warning C4251: 'ceres::GradientC
hecker::ProbeResults::residuals': class 'Eigen::Matrix<double,-1,1,0,-1,1>' needs to have dll-interface to be used by clients of st
ruct 'ceres::GradientChecker::ProbeResults' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Rele
ase\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\include\Eigen\src/Core/Matrix.h(449): message : see declaration of 'Eigen::Matrix<double,-1,
1,0,-1,1>' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_checker.h(97,34): warning C4251: 'ceres::GradientC
hecker::ProbeResults::jacobians': class 'std::vector<ceres::Matrix,std::allocatorceres::Matrix>' needs to have dll-interface to b
e used by clients of struct 'ceres::GradientChecker::ProbeResults' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build
temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_checker.h(97): message : see declaration of 'std::
vector<ceres::Matrix,std::allocatorceres::Matrix>' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64
-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_checker.h(100,40): warning C4251: 'ceres::Gradient
Checker::ProbeResults::local_jacobians': class 'std::vector<ceres::Matrix,std::allocatorceres::Matrix>' needs to have dll-interfa
ce to be used by clients of struct 'ceres::GradientChecker::ProbeResults' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e
\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_checker.h(97): message : see declaration of 'std::
vector<ceres::Matrix,std::allocatorceres::Matrix>' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64
-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_checker.h(103,42): warning C4251: 'ceres::Gradient
Checker::ProbeResults::numeric_jacobians': class 'std::vector<ceres::Matrix,std::allocatorceres::Matrix>' needs to have dll-inter
face to be used by clients of struct 'ceres::GradientChecker::ProbeResults' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr
4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_checker.h(97): message : see declaration of 'std::
vector<ceres::Matrix,std::allocatorceres::Matrix>' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64
-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_checker.h(106,48): warning C4251: 'ceres::Gradient
Checker::ProbeResults::local_numeric_jacobians': class 'std::vector<ceres::Matrix,std::allocatorceres::Matrix>' needs to have dll
-interface to be used by clients of struct 'ceres::GradientChecker::ProbeResults' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-
8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_checker.h(97): message : see declaration of 'std::
vector<ceres::Matrix,std::allocatorceres::Matrix>' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64
-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_checker.h(113,26): warning C4251: 'ceres::Gradient
Checker::ProbeResults::error_log': class 'std::basic_string<char,std::char_traits,std::allocator>' needs to have dll-in
terface to be used by clients of struct 'ceres::GradientChecker::ProbeResults' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8ap
ctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\xstring(4648): message : see de
claration of 'std::basic_string<char,std::char_traits,std::allocator>' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build
-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_checker.h(143,69): warning C4251: 'ceres::Gradient
Checker::local_parameterizations_': class 'std::vector<const ceres::LocalParameterization *,std::allocator<const ceres::LocalParame
terization *>>' needs to have dll-interface to be used by clients of class 'ceres::GradientChecker' [C:\Users\Jonas\AppData\Local\T
emp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_checker.h(78): message : see declaration of 'std::
vector<const ceres::LocalParameterization *,std::allocator<const ceres::LocalParameterization *>>' [C:\Users\Jonas\AppData\Local\Te
mp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_checker.h(145,59): warning C4251: 'ceres::Gradient
Checker::finite_diff_cost_function_': class 'std::unique_ptr<ceres::CostFunction,std::default_deleteceres::CostFunction>' needs t
o have dll-interface to be used by clients of class 'ceres::GradientChecker' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apct
r4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/conditioned_cost_function.h(92): message : see declaration
of 'std::unique_ptr<ceres::CostFunction,std::default_deleteceres::CostFunction>' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build
-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_problem.h(109,48): warning C4251: 'ceres::Gradient
Problem::function_': class 'std::unique_ptr<ceres::FirstOrderFunction,std::default_deleteceres::FirstOrderFunction>' needs to hav
e dll-interface to be used by clients of class 'ceres::GradientProblem' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\b
uild\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_problem.h(109): message : see declaration of 'std:
:unique_ptr<ceres::FirstOrderFunction,std::default_deleteceres::FirstOrderFunction>' [C:\Users\Jonas\AppData\Local\Temp\pip-req-b
uild-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_problem.h(110,59): warning C4251: 'ceres::Gradient
Problem::parameterization_': class 'std::unique_ptr<ceres::LocalParameterization,std::default_deleteceres::LocalParameterization>
' needs to have dll-interface to be used by clients of class 'ceres::GradientProblem' [C:\Users\Jonas\AppData\Local\Temp\pip-req-bu
ild-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/local_parameterization.h(351): message : see declaration of
'std::unique_ptr<ceres::LocalParameterization,std::default_deleteceres::LocalParameterization>' [C:\Users\Jonas\AppData\Local\Te
mp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_problem.h(111,37): warning C4251: 'ceres::Gradient
Problem::scratch_': class 'std::unique_ptr<double [],std::default_delete<double []>>' needs to have dll-interface to be used by cli
ents of class 'ceres::GradientProblem' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\p
ycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_problem.h(111): message : see declaration of 'std:
:unique_ptr<double [],std::default_delete<double []>>' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd
64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_problem_solver.h(254,46): warning C4251: 'ceres::G
radientProblemSolver::Options::callbacks': class 'std::vector<ceres::IterationCallback *,std::allocator<ceres::IterationCallback *>

' needs to have dll-interface to be used by clients of struct 'ceres::GradientProblemSolver::Options' [C:\Users\Jonas\AppData\Loca
l\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_problem_solver.h(254): message : see declaration o
f 'std::vector<ceres::IterationCallback *,std::allocator<ceres::IterationCallback *>>' [C:\Users\Jonas\AppData\Local\Temp\pip-req-b
uild-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_problem_solver.h(272,25): warning C4251: 'ceres::G
radientProblemSolver::Summary::message': class 'std::basic_string<char,std::char_traits,std::allocator>' needs to have
dll-interface to be used by clients of struct 'ceres::GradientProblemSolver::Summary' [C:\Users\Jonas\AppData\Local\Temp\pip-req-bu
ild-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include\xstring(4648): message : see de
claration of 'std::basic_string<char,std::char_traits,std::allocator>' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build
-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_problem_solver.h(283,45): warning C4251: 'ceres::G
radientProblemSolver::Summary::iterations': class 'std::vector<ceres::IterationSummary,std::allocatorceres::IterationSummary>' ne
eds to have dll-interface to be used by clients of struct 'ceres::GradientProblemSolver::Summary' [C:\Users\Jonas\AppData\Local\Tem
p\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\dev\vcpkg\installed\x64-windows\share\colmap....\include\ceres/gradient_problem_solver.h(283): message : see declaration o
f 'std::vector<ceres::IterationSummary,std::allocatorceres::IterationSummary>' [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8
apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\sift.cc(33,63): warning C4244: 'argument': conversion from 'pybind11::
ssize_t' to 'int', possible loss of data [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release
\pycolmap.vcxproj]
C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\sift.cc(33,47): warning C4244: 'argument': conversion from 'pybind11::
ssize_t' to 'int', possible loss of data [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release
\pycolmap.vcxproj]
C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\sift.cc(97,98): warning C4244: 'argument': conversion from 'double' to
'const float', possible loss of data [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\py
colmap.vcxproj]
C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\sift.cc(116,47): warning C4267: 'initializing': conversion from 'size_
t' to 'int', possible loss of data [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\pycol
map.vcxproj]
C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\sift.cc(116,47): warning C4267: 'initializing': conversion from 'size_
t' to 'const int', possible loss of data [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release
\pycolmap.vcxproj]
Creating library C:/Users/Jonas/AppData/Local/Temp/pip-req-build-8apctr4e/build/temp.win-amd64-3.6/Release/Release/pycolma
p.lib and object C:/Users/Jonas/AppData/Local/Temp/pip-req-build-8apctr4e/build/temp.win-amd64-3.6/Release/Release/pycolmap.exp
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl boost::filesystem::path
_traits::convert(char const *,char const *,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator > &,class std::codecvt<wchar_t,char,struct _Mbstatet> const &)" (_imp?convert@path_traits@filesystem@boost@@YAXPEBD0AEAV?$
basic_string@_WU?$char_traits@_W@std@@v?$allocator@_W@2@@std@@aebv?$codecvt@_WDU_Mbstatet@@@5@@z) referenced in function "public: _
_cdecl boost::filesystem::path::path<class std::basic_string<char,struct std::char_traits,class std::allocator > >(clas
s std::basic_string<char,struct std::char_traits,class std::allocator > const &,void *)" (??$?0V?$basic_string@DU?$char
_traits@D@std@@v?$allocator@D@2@@std@@@path@filesystem@boost@@qeaa@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@
@Peax@Z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl boost::filesystem::path
_traits::convert(wchar_t const *,wchar_t const *,class std::basic_string<char,struct std::char_traits,class std::allocator > &,class std::codecvt<wchar_t,char,struct _Mbstatet> const &)" (_imp?convert@path_traits@filesystem@boost@@YAXPEB_W0AEAV?$ba
sic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@aebv?$codecvt@_WDU_Mbstatet@@@5@@z) referenced in function "class std::vec
tor<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_s
tring<char,struct std::char_traits,class std::allocator > > > __cdecl colmap::GetDirList(class std::basic_string<char,s
truct std::char_traits,class std::allocator > const &)" (?GetDirList@colmap@@ya?AV?$vector@V?$basic_string@DU?$char_tra
its@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@std@@aebv?$basic_s
tring@DU?$char_traits@D@std@@v?$allocator@D@2@@3@@z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64
-3.6\Release\pycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl boost::filesystem::path
_traits::dispatch(class boost::filesystem::directory_entry const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>
,class std::allocator<wchar_t> > &)" (_imp?dispatch@path_traits@filesystem@boost@@YAXAEBVdirectory_entry@23@AEAV?$basic_string@_W
U?$char_traits@_W@std@@v?$allocator@_W@2@@std@@@z) referenced in function "public: __cdecl boost::filesystem::path::path(class boost::filesystem::directory_entry const &,void *)" (??$?0Vdirectory_entry@filesystem@boost@@
@path@filesystem@boost@@qeaa@AEBVdirectory_entry@12@PEAX@Z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.wi
n-amd64-3.6\Release\pycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class boost::filesystem::pat
h & __cdecl boost::filesystem::path::operator/=(class boost::filesystem::path const &)" (_imp??_0path@filesystem@boost@@QEAAAEAV0
12@AEBV012@@z) referenced in function "class std::basic_string<char,struct std::char_traits,class std::allocator > __cd
ecl colmap::GetRelativePath(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class s
td::basic_string<char,struct std::char_traits,class std::allocator > const &)" (?GetRelativePath@colmap@@ya?AV?$basic_s
tring@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@AEBV23@0@Z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\tem
p.win-amd64-3.6\Release\pycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __cdecl boost::filesyste
m::path::compare(class boost::filesystem::path const &)const " (_imp?compare@path@filesystem@boost@@QEBAHAEBV123@@z) referenced i
n function "bool __cdecl boost::filesystem::operator==(class boost::filesystem::path const &,class boost::filesystem::path const &)
" (??8filesystem@boost@@YA_NAEBVpath@01@0@Z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Rel
ease\pycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class boost::filesystem::pat
h __cdecl boost::filesystem::path::parent_path(void)const " (_imp?parent_path@path@filesystem@boost@@qeba?AV123@XZ) referenced in
function "class std::basic_string<char,struct std::char_traits,class std::allocator > _cdecl colmap::GetParentDir(cla
ss std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (?GetParentDir@colmap@@ya?AV?$basic

string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@AEBV23@@z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\tem
p.win-amd64-3.6\Release\pycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class boost::filesystem::pat
h::iterator __cdecl boost::filesystem::path::begin(void)const " (_imp?begin@path@filesystem@boost@@qeba?AViterator@123@XZ) refere
nced in function "class std::basic_string<char,struct std::char_traits,class std::allocator > __cdecl colmap::GetRelati
vePath(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::basic_string<char
,struct std::char_traits,class std::allocator > const &)" (?GetRelativePath@colmap@@ya?AV?$basic_string@DU?$char_traits
@d@std@@v?$allocator@D@2@@std@@AEBV23@0@Z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Relea
se\pycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class boost::filesystem::pat
h::iterator __cdecl boost::filesystem::path::end(void)const " (_imp?end@path@filesystem@boost@@qeba?AViterator@123@XZ) referenced
in function "class std::basic_string<char,struct std::char_traits,class std::allocator > __cdecl colmap::GetRelativePa
th(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::basic_string<char,str
uct std::char_traits,class std::allocator > const &)" (?GetRelativePath@colmap@@ya?AV?$basic_string@DU?$char_traits@D@s
td@@v?$allocator@D@2@@std@@AEBV23@0@Z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\p
ycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class std::codecvt<wc
har_t,char,struct _Mbstatet> const & __cdecl boost::filesystem::path::codecvt(void)" (_imp?codecvt@path@filesystem@boost@@SAAEBV?
$codecvt@_WDU_Mbstatet@@@std@@xz) referenced in function "public: __cdecl boost::filesystem::path::path<class std::basic_string<cha
r,struct std::char_traits,class std::allocator > >(class std::basic_string<char,struct std::char_traits,class std
::allocator > const &,void *)" (??$?0V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@path@filesystem@boost@@qe
AA@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@Peax@Z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr
4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) private: unsigned __int64 __cdecl bo
ost::filesystem::path::m_append_separator_if_needed(void)" (_imp?m_append_separator_if_needed@path@filesystem@boost@@AEAA_KXZ) re
ferenced in function "public: class boost::filesystem::path & __cdecl boost::filesystem::path::operator/=<char [3]>(char const (&)[
3])" (??$?_0$$BY02D@path@filesystem@boost@@QEAAAEAV012@AEAY02$$CBD@Z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\bui
ld\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) private: void __cdecl boost::filesys
tem::path::m_erase_redundant_separator(unsigned __int64)" (_imp?m_erase_redundant_separator@path@filesystem@boost@@AEAAX_K@Z) ref
erenced in function "public: class boost::filesystem::path & __cdecl boost::filesystem::path::operator/=<char [3]>(char const (&)[3
])" (??$?_0$$BY02D@path@filesystem@boost@@QEAAAEAV012@AEAY02$$CBD@Z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\buil
d\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) private: static void __cdecl boost::
filesystem::path::m_path_iterator_increment(class boost::filesystem::path::iterator &)" (_imp?m_path_iterator_increment@path@file
system@boost@@CAXAEAViterator@123@@z) referenced in function "private: static void __cdecl boost::iterators::iterator_core_access::
increment(class boost::filesystem::path::iterator &)" (??$increment@Viterator@path@filesys
tem@boost@@@iterator_core_access@iterators@boost@@CAXAEAViterator@path@filesystem@2@@z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-
build-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) private: class boost::filesystem::fi
le_status __cdecl boost::filesystem::directory_entry::get_status(class boost::system::error_code *)const " (_imp?get_status@direc
tory_entry@filesystem@boost@@aeba?AVfile_status@23@PEAVerror_code@system@3@@z) referenced in function "class std::vector<class std:
:basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,str
uct std::char_traits,class std::allocator > > > __cdecl colmap::GetDirList(class std::basic_string<char,struct std::cha
r_traits,class std::allocator > const &)" (?GetDirList@colmap@@ya?AV?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$
allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@std@@aebv?$basic_string@DU?$char
_traits@D@std@@v?$allocator@D@2@@3@@z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\p
ycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) class boost::system::error_code __cd
ecl boost::filesystem::detail::dir_itr_close(void * &)" (_imp?dir_itr_close@detail@filesystem@boost@@ya?AVerror_code@system@3@AEA
PEAX@Z) referenced in function "void __cdecl std::_Destroy_range<class std::allocator
(class boost::filesystem::directory_iterator *,class boost::filesystem::directory_iterator * const,class std::allocator &)" (??$_Destroy_range@V?$allocator@Vdirectory_iterator@filesystem@boost@@@std@@@std@@YAXPEAVdir
ectory_iterator@filesystem@boost@@QEAV123@AEAV?$allocator@Vdirectory_iterator@filesystem@boost@@@0@@z) [C:\Users\Jonas\AppData\Loca
l\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl boost::filesystem::deta
il::directory_iterator_construct(class boost::filesystem::directory_iterator &,class boost::filesystem::path const &,unsigned int,c
lass boost::system::error_code *)" (_imp?directory_iterator_construct@detail@filesystem@boost@@YAXAEAVdirectory_iterator@23@AEBVp
ath@23@IPEAVerror_code@system@3@@z) referenced in function "public: __cdecl boost::filesystem::directory_iterator::directory_iterat
or(class boost::filesystem::path const &,enum boost::filesystem::directory_options)" (??0directory_iterator@filesystem@boost@@qeaa@
AEBVpath@12@W4directory_options@12@@z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\p
ycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl boost::filesystem::deta
il::directory_iterator_increment(class boost::filesystem::directory_iterator &,class boost::system::error_code *)" (_imp?director
y_iterator_increment@detail@filesystem@boost@@YAXAEAVdirectory_iterator@23@PEAVerror_code@system@3@@z) referenced in function "priv
ate: static void __cdecl boost::iterators::iterator_core_access::increment(class boost
::filesystem::directory_iterator &)" (??$increment@Vdirectory_iterator@filesystem@boost@@@iterator_core_access@iterators@boost@@cax
AEAVdirectory_iterator@filesystem@2@@z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release
pycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl boost::filesystem::deta
il::recursive_directory_iterator_construct(class boost::filesystem::recursive_directory_iterator &,class boost::filesystem::path co
nst &,unsigned int,class boost::system::error_code *)" (_imp?recursive_directory_iterator_construct@detail@filesystem@boost@@yaxa
EAVrecursive_directory_iterator@23@AEBVpath@23@IPEAVerror_code@system@3@@z) referenced in function "public: __cdecl boost::filesyst
em::recursive_directory_iterator::recursive_directory_iterator(class boost::filesystem::path const &)" (??0recursive_directory_iter
ator@filesystem@boost@@qeaa@AEBVpath@12@@z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Rele
ase\pycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl boost::filesystem::deta
il::recursive_directory_iterator_increment(class boost::filesystem::recursive_directory_iterator &,class boost::system::error_code
*)" (_imp?recursive_directory_iterator_increment@detail@filesystem@boost@@YAXAEAVrecursive_directory_iterator@23@PEAVerror_code@s
ystem@3@@z) referenced in function "private: static void __cdecl boost::iterators::iterator_core_access::increment(class boost::filesystem::recursive_directory_iterator &)" (??$increment@Vrecursive_directory
_iterator@filesystem@boost@@@iterator_core_access@iterators@boost@@CAXAEAVrecursive_directory_iterator@filesystem@2@@z) [C:\Users\J
onas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) class boost::filesystem::file_status
__cdecl boost::filesystem::detail::status(class boost::filesystem::path const &,class boost::system::error_code *)" (_imp?status
@detail@filesystem@boost@@ya?AVfile_status@23@AEBVpath@23@PEAVerror_code@system@3@@z) referenced in function "void __cdecl colmap::
CreateDirIfNotExists(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (?CreateDirI
fNotExists@colmap@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) [C:\Users\Jonas\AppData\Local\Temp\pip-r
eq-build-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) class boost::filesystem::path __cdec
l boost::filesystem::detail::canonical(class boost::filesystem::path const &,class boost::filesystem::path const &,class boost::sys
tem::error_code *)" (_imp?canonical@detail@filesystem@boost@@ya?AVpath@23@AEBV423@0PEAVerror_code@system@3@@z) referenced in func
tion "class std::basic_string<char,struct std::char_traits,class std::allocator > __cdecl colmap::GetRelativePath(class
std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::basic_string<char,struct std:
:char_traits,class std::allocator > const &)" (?GetRelativePath@colmap@@ya?AV?$basic_string@DU?$char_traits@D@std@@v?$a
llocator@D@2@@std@@AEBV23@0@Z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.
vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) bool __cdecl boost::filesystem::deta
il::create_directory(class boost::filesystem::path const &,class boost::filesystem::path const *,class boost::system::error_code *)
" (_imp?create_directory@detail@filesystem@boost@@YA_NAEBVpath@23@PEBV423@PEAVerror_code@system@3@@z) referenced in function "voi
d __cdecl colmap::CreateDirIfNotExists(class std::basic_string<char,struct std::char_traits,class std::allocator > cons
t &)" (?CreateDirIfNotExists@colmap@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) [C:\Users\Jonas\AppDat
a\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
colmap.lib(misc.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) class boost::filesystem::path __cdec
l boost::filesystem::detail::current_path(class boost::system::error_code *)" (_imp?current_path@detail@filesystem@boost@@ya?AVpa
th@23@PEAVerror_code@system@3@@z) referenced in function "class std::basic_string<char,struct std::char_traits,class std::all
ocator > __cdecl colmap::GetRelativePath(class std::basic_string<char,struct std::char_traits,class std::allocator<char

const &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (?GetRelativePath@col
map@@ya?AV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@AEBV23@0@Z) [C:\Users\Jonas\AppData\Local\Temp\pip-req-build
-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vcxproj]
C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\lib.win-amd64-3.6\pycolmap.cp36-win_amd64.pyd : fatal error LNK1
120: 22 unresolved externals [C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\build\temp.win-amd64-3.6\Release\pycolmap.vc
xproj]
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\setup.py", line 71, in
zip_safe=False,
File "C:\Users\Jonas\anaconda3\envs\cuda\lib\site-packages\setuptools_init_.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Jonas\anaconda3\envs\cuda\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Jonas\anaconda3\envs\cuda\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Users\Jonas\anaconda3\envs\cuda\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Jonas\anaconda3\envs\cuda\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Users\Jonas\anaconda3\envs\cuda\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Users\Jonas\anaconda3\envs\cuda\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Jonas\anaconda3\envs\cuda\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Jonas\anaconda3\envs\cuda\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\Jonas\anaconda3\envs\cuda\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Jonas\anaconda3\envs\cuda\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\setup.py", line 32, in run
self.build_extension(ext)
File "C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\setup.py", line 60, in build_extension
subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
File "C:\Users\Jonas\anaconda3\envs\cuda\lib\subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit st
atus 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Jonas\anaconda3\envs\cuda\python.exe' -u -c 'import sys, setuptools, token
ize; sys.argv[0] = '"'"'C:\Users\Jonas\AppData\Local\Temp\pip-req-build-8apctr4e\setup.py'"'"'; file='"'"'C:\Users\Jon
as\AppData\Local\Temp\pip-req-build-8apctr4e\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().r
eplace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Jonas\AppD
ata\Local\Temp\pip-record-zmi5_s16\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Jo
nas\anaconda3\envs\cuda\Include\pycolmap' Check the logs for full command output.

Input arguments for generalized_absolute_pose.cc

Hi pycolmap team,

thanks for maintaining this great project! I feel a bit unclear about the input arguments for rig_absolute_pose_estimation:

py::dict rig_absolute_pose_estimation(
        const std::vector<std::vector<Eigen::Vector2d>> points2D,
        const std::vector<std::vector<Eigen::Vector3d>> points3D,
        const std::vector<Camera> cameras,
        const std::vector<Eigen::Vector4d> rig_qvecs,
        const std::vector<Eigen::Vector3d> rig_tvecs,
        RANSACOptions ransac_options,
        AbsolutePoseRefinementOptions refinement_options,
        const bool return_covariance
) 

For rig_qvecs and rig_tvecs, I guess they should contain the camera poses inside the rig. I am not sure whether these poses should be in the local frame of the camera rig(for example, poses w.r.t. the center of the camera rig) or they should be in the same coordinate system of the points3D(I would call it world frame)? There's not too much comment in the code there so I can't figure it out confidently.

I also notice in colmap function RefineGeneralizedAbsolutePose that you set the rig_poses to constant, meaning you are not changing the inner geometry or the rig. And should the output of rig_absolute_pose_estimation be the pose of the rig center(tvec, qvec)?

Regards,
Liyuan

Windows10 install pycolmap error: " Could not find a package configuration file provided by "COLMAP" with any of the following names: COLMAPConfig.cmake colmap-config.cmake"

I have installed COLMAP according to the instruction. When I tried to install pycolmap. The errors came:

" ERROR: Command errored out with exit status 1:
command: 'C:\Users\walterz\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py'"'"'; file='"'"'C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\walterz\AppData\Local\Temp\pip-wheel-bsm0f304'
cwd: C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw
Complete output (70 lines):
running bdist_wheel
running build
running build_ext
-- Building for: Visual Studio 15 2017
-- Selecting Windows SDK version 10.0.17134.0 to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.15.26726.0
-- The CXX compiler identification is MSVC 19.15.26726.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:4 (find_package):
By not providing "FindCOLMAP.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "COLMAP", but
CMake did not find one.

Could not find a package configuration file provided by "COLMAP" with any
of the following names:

  COLMAPConfig.cmake
  colmap-config.cmake

Add the installation prefix of "COLMAP" to CMAKE_PREFIX_PATH or set
"COLMAP_DIR" to a directory containing one of the above files.  If "COLMAP"
provides a separate development package or SDK, be sure it has been
installed.

-- Configuring incomplete, errors occurred!
See also "C:/Users/walterz/AppData/Local/Temp/pip-req-build-epttgyhw/build/temp.win-amd64-3.8/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py", line 80, in
setup(
File "C:\Users\walterz\anaconda3\lib\site-packages\setuptools_init_.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\walterz\anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\walterz\anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\walterz\anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\walterz\anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 299, in run
self.run_command('build')
File "C:\Users\walterz\anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\walterz\anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\walterz\anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\walterz\anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\walterz\anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py", line 34, in run
self.build_extension(ext)
File "C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py", line 76, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "C:\Users\walterz\anaconda3\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\build\lib.win-amd64-3.8', '-DPYTHON_EXECUTABLE=C:\Users\walterz\anaconda3\python.exe', '-DVERSION_INFO=0.2.0', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\build\lib.win-amd64-3.8', '-A', 'x64']' returned non-zero exit status 1.
['cmake', 'C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\build\lib.win-amd64-3.8', '-DPYTHON_EXECUTABLE=C:\Users\walterz\anaconda3\python.exe', '-DVERSION_INFO=0.2.0', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\build\lib.win-amd64-3.8', '-A', 'x64']

ERROR: Failed building wheel for pycolmap
Running setup.py clean for pycolmap
Failed to build pycolmap
Installing collected packages: pycolmap
Running setup.py install for pycolmap ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\walterz\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py'"'"'; file='"'"'C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\walterz\AppData\Local\Temp\pip-record-e5ss5ncq\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\walterz\anaconda3\Include\pycolmap'
cwd: C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw
Complete output (72 lines):
running install
running build
running build_ext
-- Building for: Visual Studio 15 2017
-- Selecting Windows SDK version 10.0.17134.0 to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.15.26726.0
-- The CXX compiler identification is MSVC 19.15.26726.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:4 (find_package):
By not providing "FindCOLMAP.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "COLMAP", but
CMake did not find one.

  Could not find a package configuration file provided by "COLMAP" with any
  of the following names:

    COLMAPConfig.cmake
    colmap-config.cmake

  Add the installation prefix of "COLMAP" to CMAKE_PREFIX_PATH or set
  "COLMAP_DIR" to a directory containing one of the above files.  If "COLMAP"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "C:/Users/walterz/AppData/Local/Temp/pip-req-build-epttgyhw/build/temp.win-amd64-3.8/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py", line 80, in <module>
    setup(
  File "C:\Users\walterz\anaconda3\lib\site-packages\setuptools\__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\walterz\anaconda3\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\walterz\anaconda3\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\walterz\anaconda3\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\walterz\anaconda3\lib\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "C:\Users\walterz\anaconda3\lib\distutils\command\install.py", line 545, in run
    self.run_command('build')
  File "C:\Users\walterz\anaconda3\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\walterz\anaconda3\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\walterz\anaconda3\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "C:\Users\walterz\anaconda3\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\walterz\anaconda3\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py", line 34, in run
    self.build_extension(ext)
  File "C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py", line 76, in build_extension
    subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
  File "C:\Users\walterz\anaconda3\lib\subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\walterz\\AppData\\Local\\Temp\\pip-req-build-epttgyhw', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\walterz\\AppData\\Local\\Temp\\pip-req-build-epttgyhw\\build\\lib.win-amd64-3.8', '-DPYTHON_EXECUTABLE=C:\\Users\\walterz\\anaconda3\\python.exe', '-DVERSION_INFO=0.2.0', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\walterz\\AppData\\Local\\Temp\\pip-req-build-epttgyhw\\build\\lib.win-amd64-3.8', '-A', 'x64']' returned non-zero exit status 1.
['cmake', 'C:\\Users\\walterz\\AppData\\Local\\Temp\\pip-req-build-epttgyhw', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\walterz\\AppData\\Local\\Temp\\pip-req-build-epttgyhw\\build\\lib.win-amd64-3.8', '-DPYTHON_EXECUTABLE=C:\\Users\\walterz\\anaconda3\\python.exe', '-DVERSION_INFO=0.2.0', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\walterz\\AppData\\Local\\Temp\\pip-req-build-epttgyhw\\build\\lib.win-amd64-3.8', '-A', 'x64']
----------------------------------------

ERROR: Command errored out with exit status 1: 'C:\Users\walterz\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py'"'"'; file='"'"'C:\Users\walterz\AppData\Local\Temp\pip-req-build-epttgyhw\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\walterz\AppData\Local\Temp\pip-record-e5ss5ncq\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\walterz\anaconda3\Include\pycolmap' Check the logs for full command output. "

What is the problem? Could any expert help me? Thank you.

Example for exporting model?

Hi,

I want to export the reconstruction to reconstruct the dense model from that. There are several options to export models into NVM, VRML, PLY, bundler as in reconstruction/reconstruction.cc. But the usages of these functions are unclear for me. Could you kindly provide an example of exporting models?

Memory Leak in absolute_pose_estimation

Hey Mihai,

I just found out that absolute_pose_estimation is leaking memory. This was verified with the repository at the following point in time 03eb8a4

MVE

import gc
from memory_profiler import profile
import numpy as np
from pycolmap import absolute_pose_estimation

@profile
def estimation_pose():

    # instantiate a couple of points centered around the origin
    pts = 0.6 * (np.random.random((6, 3)) - 0.5)

    # Made up projective matrix
    K = np.array([[160, 0, 320], [0, 120, 240], [0, 0, 1]])

    # A pose
    R_gt = np.array(
        [
            [-0.48048015, 0.1391384, -0.86589799],
            [-0.0333282, -0.98951829, -0.14050899],
            [-0.8763721, -0.03865296, 0.48008113],
        ]
    )
    t_gt = np.array([-0.10266772, 0.25450789, 1.70391109])

    # Project points to 2D
    pts_2d = (pts @ R_gt.T + t_gt) @ K.T
    pts_2d = (pts_2d / pts_2d[:, -1, None])[:, :-1]

    camera = dict(
        model="SIMPLE_PINHOLE", width=640, height=480, params=[160.0, 320.0, 240.0]
    )
    absolute_pose_estimation(pts_2d, pts, camera, 1.0)
    gc.collect()


while True:
    estimation_pose()

This is producing the following memory footprint
Screenshot from 2021-02-19 15-22-32

I checked the function and everything seems to be ok. This might be an issue in your dependencies, but I thought about letting you know anyway.

Cheers

Shared intrinsics for all cameras

Hi,

thank you for maintaining these great python wheels for colmap. I want to ask is there any place to set all the cameras to share the same intrinsics and I don't want colmap to adjust the image intrinsics one by one.

There is a 'shared for all images' button in feature extraction in colmap gui.

I extracted image features with superpoint(I used hloc) and can I set shared intrinsics for all images with pycolmap?

Another question would be if I set 'shared intrinsics for all images', will colmap adjust the intrinsics of all images at the same time, one by one or just fix them during bundle adjustment?

Best regards,
Liyuan

PYCOLMAP failed building on Windows

Hi

I am trying to build it on Windows and after running this command:

python -m pip install ./

I ran into this error:

C:\Users\user\AppData\Local\Temp\pip-req-build-iz4keycs\pipeline.cc(10,10): fatal error C1083: Cannot open include file: 'colmap/exe/feature.h': No such file or directory [C:\Users\user\AppData\Local\Temp\pip-req-build-iz4keycs\build\temp.win-amd64-3.8\Release\pycolmap.vcxproj]

do you guys have any idea on how to solve this? Thank you

Pip wheels for Mac M1 (arm64)

I am struggling to build the library on a Macbook Pro M1 with the given instructions and latest commit in master.

compiler error in generalized_absolute_pose.cc

I tried to install pycolmap after I installed the latest release of colmap from source (tag 3.6). However, I got a compiler error in generalized_absolute_pose.cc, line 263, which was modified in a commit yesterday (6e048c2)
@skydes Can we circumvent this change somehow or should I upgrade my colmap source instead?

pip3 install git+https://github.com/mihaidusmanu/pycolmap
[...]
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found required Ceres dependency: Eigen version 3.3.4 in /usr/include/eigen3
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.0.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations, Multithreading]
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- program_options
-- filesystem
-- regex
-- system
-- unit_test_framework
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "2.91.0")
-- Found Eigen
-- Includes : /usr/include/eigen3
-- Found FreeImage
-- Includes : /usr/include
-- Libraries : /usr/lib/x86_64-linux-gnu/libfreeimage.so
-- Found Glog
-- Includes : /usr/include
-- Libraries : /usr/lib/x86_64-linux-gnu/libglog.so
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
-- Found Glew
-- Includes : /usr/include
-- Libraries : /usr/lib/x86_64-linux-gnu/libGLEW.so
-- Found PythonInterp: /home/esoptron/anaconda3/envs/mcl/bin/python (found version "3.6.13")
-- Found PythonLibs: /home/esoptron/anaconda3/envs/mcl/lib/libpython3.6m.so
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.5.dev1
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-req-build-ru57jz_j/build/temp.linux-x86_64-3.6
Scanning dependencies of target pycolmap
[ 50%] Building CXX object CMakeFiles/pycolmap.dir/main.cc.o
In file included from /tmp/pip-req-build-ru57jz_j/main.cc:6:
/tmp/pip-req-build-ru57jz_j/generalized_absolute_pose.cc: In function ‘pybind11::dict rig_absolute_pose_estimation(std::vector<std::vector<Eigen::Matrix<double, 2, 1>, std::allocator<Eigen::Matrix<double, 2, 1> > > >, std::vector<std::vector<Eigen::Matrix<double, 3, 1> > >, std::vectorpybind11::dict, std::vector<Eigen::Matrix<double, 4, 1>, std::allocator<Eigen::Matrix<double, 4, 1> > >, std::vector<Eigen::Matrix<double, 3, 1> >, double)’:
/tmp/pip-req-build-ru57jz_j/generalized_absolute_pose.cc:263:22: error: ‘class colmap::GP3PEstimator’ has no member named ‘residual_type’; did you mean ‘Residuals’?
ransac.estimator.residual_type = GP3PEstimator::ResidualType::ReprojectionError;
^~~~~~~~~~~~~
Residuals
/tmp/pip-req-build-ru57jz_j/generalized_absolute_pose.cc:263:53: error: ‘colmap::GP3PEstimator::ResidualType’ has not been declared
ransac.estimator.residual_type = GP3PEstimator::ResidualType::ReprojectionError;
^~~~~~~~~~~~
CMakeFiles/pycolmap.dir/build.make:62: recipe for target 'CMakeFiles/pycolmap.dir/main.cc.o' failed
make[2]: *** [CMakeFiles/pycolmap.dir/main.cc.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pycolmap.dir/all' failed
make[1]: *** [CMakeFiles/pycolmap.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
[...]


ERROR: Failed building wheel for pycolmap

pycolmap.absolute_pose_estimation() - Does it matter if 3D points are in world or camera space ?

Hello,

Thanks for pycolmap !! Great work!

I think this is a more general/high-level question, it is about pycolmap.absolute_pose_estimation()

It says that the method assumes 3D points in world coordinates.

Assuming I have two sets of 2D-3D points correspondences:

  • Set 1: The 3D points are in camera space (camera coordinate space)
  • Set 2: The 3D points are in world space (world coordinate space)

For both sets the 2D points are the same.

For set 1, pycolmap.absolute_pose_estimation() will return a camera pose in camera space ?
For set 2, pycolmap.absolute_pose_estimation() will return a camera pose in world space ?

Building package is failed

I am trying to install pycolmap. But I cannot install openblas package with vcpkg.
here are my parameters:
Python 3.6
Microsoft Visual Studio 2019
Windows 10

And here the Error I get:
Error: Building package openblas:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with git pull and .\vcpkg update.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+openblas
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[openblas]+Build+error
including:
package: openblas[core]:x64-windows -> 0.3.15#1
vcpkg-tool version: 2021-11-24-48b94a6946b8a70abd21529218927fd478d02b6c
vcpkg-scripts version: 3a68454af 2021-11-27 (31 hours ago)

Additionally, attach any relevant sections from the log files above.

build failure (final link failed) in Ubuntu 22.04

Hi, I'm trying to install pycolmap in Ubuntu 22.04 with Python 3.10.4.
I already installed CUDA 11.7 and built Cere solver and COLMAP successfully.

I used pip to install pycolmap but error occurs, the output is attached below:


Defaulting to user installation because normal site-packages is not writeable
Processing /home/wang/pycolmap
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pycolmap
Building wheel for pycolmap (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [93 lines of output]
running bdist_wheel
running build
running build_ext
['cmake', '/home/wang/pycolmap', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/wang/pycolmap/build/lib.linux-x86_64-3.10', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DVERSION_INFO=0.2.0', '-DCMAKE_BUILD_TYPE=Release']
-- Found AMD headers in: /usr/include/suitesparse
-- Found AMD library: /usr/lib/x86_64-linux-gnu/libamd.so
-- Found CAMD headers in: /usr/include/suitesparse
-- Found CAMD library: /usr/lib/x86_64-linux-gnu/libcamd.so
-- Found CCOLAMD headers in: /usr/include/suitesparse
-- Found CCOLAMD library: /usr/lib/x86_64-linux-gnu/libccolamd.so
-- Found CHOLMOD headers in: /usr/include/suitesparse
-- Found CHOLMOD library: /usr/lib/x86_64-linux-gnu/libcholmod.so
-- Found COLAMD headers in: /usr/include/suitesparse
-- Found COLAMD library: /usr/lib/x86_64-linux-gnu/libcolamd.so
-- Found SPQR headers in: /usr/include/suitesparse
-- Found SPQR library: /usr/lib/x86_64-linux-gnu/libspqr.so
-- Found Config headers in: /usr/include/suitesparse
-- Found Config library: /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so
-- Did not find Intel TBB library, assuming SuiteSparseQR was not compiled with TBB.
-- Adding librt to SuiteSparse_config libraries (required on Linux & Unix [not OSX] if SuiteSparse is compiled with timing).
-- Found required Ceres dependency: Eigen version 3.4.0 in /usr/share/eigen3/cmake
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.1.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations, Multithreading]
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0") found components: program_options filesystem system unit_test_framework
-- Found Eigen
-- Includes : /usr/include/eigen3
-- Found FreeImage
-- Includes : /usr/include
-- Libraries : /usr/lib/x86_64-linux-gnu/libfreeimage.so
-- Found Metis
-- Includes : /usr/include
-- Libraries : /usr/lib/x86_64-linux-gnu/libmetis.so
-- Found Glog
-- Includes : /usr/include
-- Libraries : /usr/lib/x86_64-linux-gnu/libglog.so
-- Found Glew
-- Includes : /usr/include
-- Libraries : /usr/lib/x86_64-linux-gnu/libGLEW.so
-- Using header-only CGAL
-- Targetting Unix Makefiles
-- Using /usr/bin/c++ compiler.
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.48")
-- Boost include dirs: /usr/include
-- Boost libraries:
-- Using gcc version 4 or later. Adding -frounding-math
-- pybind11 v2.8.1
Compiling bindings with CUDA support.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/wang/pycolmap/build/temp.linux-x86_64-3.10
Consolidate compiler generated dependencies of target pycolmap
[ 50%] Building CXX object CMakeFiles/pycolmap.dir/main.cc.o
[100%] Linking CXX shared module ../lib.linux-x86_64-3.10/pycolmap.cpython-310-x86_64-linux-gnu.so
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap_cuda.a(colmap_cuda_generated_patch_match_cuda.cu.o): warning: relocation against _ZN6colmap3mvs20SweepFromTopToBottomILi5ELi1ELb0ELb1ELb0EEEvNS0_6GpuMatIfEENS2_I17curandStateXORWOWEES3_S3_S3_NS2_IhEES3_S3_S3_S3_NS0_12SweepOptionsE' in read-only section .text._ZN6colmap3mvs14PatchMatchCuda24RunWithWindowSizeAndStepILi5ELi1EEEvv[_ZN6colmap3mvs14PatchMatchCuda24RunWithWindowSizeAndStepILi5ELi1EEEvv]'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap_cuda.a(colmap_cuda_generated_patch_match_cuda.cu.o): relocation R_X86_64_PC32 against symbol `_ZN6colmap3mvs13InitNormalMapENS0_6GpuMatIfEENS1_I17curandStateXORWOWEE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/pycolmap.dir/build.make:135: ../lib.linux-x86_64-3.10/pycolmap.cpython-310-x86_64-linux-gnu.so] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/pycolmap.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/home/wang/pycolmap/setup.py", line 80, in
setup(
File "/usr/lib/python3/dist-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.10/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.10/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/usr/lib/python3.10/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.10/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.10/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/wang/pycolmap/setup.py", line 34, in run
self.build_extension(ext)
File "/home/wang/pycolmap/setup.py", line 77, in build_extension
subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
[end of output]


/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap_cuda.a(colmap_cuda_generated_patch_match_cuda.cu.o): warning: relocation against `_ZN6colmap3mvs20SweepFromTopToBottomILi5ELi1ELb0ELb1ELb0EEEvNS0_6GpuMatIfEENS2_I17curandStateXORWOWEES3_S3_S3_NS2_IhEES3_S3_S3_S3_NS0_12SweepOptionsE' in read-only section `.text._ZN6colmap3mvs14PatchMatchCuda24RunWithWindowSizeAndStepILi5ELi1EEEvv[_ZN6colmap3mvs14PatchMatchCuda24RunWithWindowSizeAndStepILi5ELi1EEEvv]' /usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap_cuda.a(colmap_cuda_generated_patch_match_cuda.cu.o): relocation R_X86_64_PC32 against symbol `_ZN6colmap3mvs13InitNormalMapENS0_6GpuMatIfEENS1_I17curandStateXORWOWEE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: bad value

Could any expert help me? Thank you.

Generalisze_Absolute_Pose usage

Hi there,
First of all, thank you for sharing this code.
Having such a python level control of COLMAP is exactly what I am looking for!

I am particularly interested in using rig_absolute_pose_estimation(), but I am not sure I understand correctly the required inputs.
In my case, I start with:

  • N rgb images
  • N cameras world transforms (coming from ARKit)
  • N camera intrinsics (coming from ARKit)

My biggest problem is to understand what 2d points and 3d points are expected:

  • I can generate 2d points from feature extraction per rgb image (using SuperPoint for example)
  • I can match 2d points across images to create pairs (using SuperGlue for example)
  • I can compute 3d points from these pairs of 2d points by triangulating using ARKit transforms
    But I am not sure how to feed rig_absolute_pose_estimation() with these inputs

If you could provide a small example illustrating how to prepare 2d points and 3d points, it would be very useful

Thanks in advance,

PP

About calculation of essential matrix and fundamental matrix

Hi, thank you for this excellent work. According to the definition of essential matrix and fundamental matrix, the calculation of the fundamental matrix requires camera intrinsics, which are not required by calculation of the essential matrix. But why is it the opposite in pycolmap's implementation?

Parameters:

  • points2D1: Nx2 array; pixel coordinates in image 1
  • points2D2: Nx2 array; pixel coordinates in image 2
  • camera1: pycolmap.Camera of image 1
  • camera2: pycolmap.Camera of image 2
    Optional parameters:
  • max_error_px: float; RANSAC inlier threshold in pixels (default=4.0)
  • options: dict or pycolmap.RANSACOptions

answer = pycolmap.essential_matrix_estimation(points2D1, points2D2, camera1, camera2)

Returns: dictionary of estimation outputs

answer = pycolmap.fundamental_matrix_estimation(
points2D1,
points2D2,
[max_error_px], # optional RANSAC inlier threshold in pixels
[options], # optional dict or pycolmap.RANSACOptions
)

Could you please help on how to install with `pip install git+https://github.com/mihaidusmanu/pycolmap`

Hi @mihaidusmanu,

Thanks so much for releasing this awesome package.
Here, I would like to kindly ask for your help on how to install your package with

pip install git+https://github.com/mihaidusmanu/pycolmap

Actually, I was following the instruction of image matching toolbox in here.

However, I am not sure what did I do wrong... I installed it under the immatch conda environment.

(immatch) userxxxx@userxxxx:/mnt/HDD4TB1/image-matching-toolbox$ pip install git+https://github.com/mihaidusmanu/pycolmap
  • Also, I have tried installing your package with pip install pycolmap which is possible. But, as I tried to use the suggested command pip install git+http..... I could not do it....

  • Is it possible to use the pip install one as the alternative? What is the difference in using this pip command versus the pip pip install git+http...... Are they the same version?

The bugs are as follows:

(immatch) gabby-suwichaya@gabby-suwichaya:/mnt/HDD4TB1/image-matching-toolbox$ pip install git+https://github.com/mihaidusmanu/pycolmap
Collecting git+https://github.com/mihaidusmanu/pycolmap
  Cloning https://github.com/mihaidusmanu/pycolmap to /tmp/pip-req-build-t9plrora
  Running command git clone -q https://github.com/mihaidusmanu/pycolmap /tmp/pip-req-build-t9plrora
  Resolved https://github.com/mihaidusmanu/pycolmap to commit e3ee6a30ce0435be2ce190df6a35ff63384f9c5a
  Running command git submodule update --init --recursive -q
Building wheels for collected packages: pycolmap
  Building wheel for pycolmap (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/gabby-suwichaya/anaconda3/envs/immatch/bin/python3.7 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-t9plrora/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-t9plrora/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-v72izk4x
       cwd: /tmp/pip-req-build-t9plrora/
  Complete output (143 lines):
  running bdist_wheel
  running build
  running build_ext
  ['cmake', '/tmp/pip-req-build-t9plrora', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-req-build-t9plrora/build/lib.linux-x86_64-3.7', '-DPYTHON_EXECUTABLE=/home/gabby-suwichaya/anaconda3/envs/immatch/bin/python3.7', '-DCMAKE_BUILD_TYPE=Release']
  -- The C compiler identification is GNU 9.3.0
  -- The CXX compiler identification is GNU 9.3.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Looking for pthread.h
  -- Looking for pthread.h - found
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
  -- Looking for pthread_create in pthreads
  -- Looking for pthread_create in pthreads - not found
  -- Looking for pthread_create in pthread
  -- Looking for pthread_create in pthread - found
  -- Found Threads: TRUE
  -- Found required Ceres dependency: Eigen version 3.3.7 in /usr/include/eigen3
  -- Found required Ceres dependency: glog
  -- Found required Ceres dependency: gflags
  -- Found Ceres version: 2.0.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations, Multithreading]
  -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: program_options filesystem system unit_test_framework
  -- Found Eigen3: /usr/include/eigen3 (Required is at least version "2.91.0")
  -- Found Eigen
  --   Includes : /usr/include/eigen3
  -- Found FreeImage
  --   Includes : /usr/include
  --   Libraries : /usr/lib/x86_64-linux-gnu/libfreeimage.so
  -- Found Glog
  --   Includes : /usr/include
  --   Libraries : /usr/lib/x86_64-linux-gnu/libglog.so
  CMake Warning (dev) at /home/gabby-suwichaya/anaconda3/share/cmake-3.18/Modules/FindOpenGL.cmake:305 (message):
    Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
    available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
    cmake_policy command to set the policy and suppress this warning.
  
    FindOpenGL found both a legacy GL library:
  
      OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so
  
    and GLVND libraries for OpenGL and GLX:
  
      OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
      OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so
  
    OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
    compatibility with CMake 3.10 and below the legacy GL library will be used.
  Call Stack (most recent call first):
    /usr/local/share/colmap/COLMAPConfig.cmake:103 (find_package)
    CMakeLists.txt:6 (find_package)
  This warning is for project developers.  Use -Wno-dev to suppress it.
  
  -- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
  -- Found Glew
  --   Includes : /usr/include
  --   Libraries : /usr/lib/x86_64-linux-gnu/libGLEW.so
  -- Using header-only CGAL
  -- Targetting Unix Makefiles
  -- Using /usr/bin/c++ compiler.
  -- Found GMP: /usr/lib/x86_64-linux-gnu/libgmp.so
  -- Found MPFR: /usr/lib/x86_64-linux-gnu/libmpfr.so
  -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.48")
  -- Boost include dirs: /usr/include
  -- Boost libraries:
  -- Using gcc version 4 or later. Adding -frounding-math
  -- Found PythonInterp: /home/gabby-suwichaya/anaconda3/envs/immatch/bin/python3.7 (found version "3.7.10")
  -- Found PythonLibs: /home/gabby-suwichaya/anaconda3/envs/immatch/lib/libpython3.7m.so
  -- Performing Test HAS_CPP14_FLAG
  -- Performing Test HAS_CPP14_FLAG - Success
  -- pybind11 v2.5.dev1
  -- Performing Test HAS_FLTO
  -- Performing Test HAS_FLTO - Success
  -- LTO enabled
  -- Configuring done
  CMake Warning at pybind11/tools/pybind11Tools.cmake:131 (add_library):
    Cannot generate a safe runtime search path for target pycolmap because
    files in some directories may conflict with libraries in implicit
    directories:
  
      runtime library [libgmp.so.10] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
        /home/gabby-suwichaya/anaconda3/envs/immatch/lib
      runtime library [liblapack.so.3] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
        /home/gabby-suwichaya/anaconda3/envs/immatch/lib
  
    Some of these libraries may not be found correctly.
  Call Stack (most recent call first):
    CMakeLists.txt:12 (pybind11_add_module)
  
  
  -- Generating done
  -- Build files have been written to: /tmp/pip-req-build-t9plrora/build/temp.linux-x86_64-3.7
  Scanning dependencies of target pycolmap
  [ 50%] Building CXX object CMakeFiles/pycolmap.dir/main.cc.o
  In file included from /tmp/pip-req-build-t9plrora/main.cc:6:
  /tmp/pip-req-build-t9plrora/generalized_absolute_pose.cc: In function ‘pybind11::dict rig_absolute_pose_estimation(std::vector<std::vector<Eigen::Matrix<double, 2, 1>, std::allocator<Eigen::Matrix<double, 2, 1> > > >, std::vector<std::vector<Eigen::Matrix<double, 3, 1> > >, std::vector<pybind11::dict>, std::vector<Eigen::Matrix<double, 4, 1>, std::allocator<Eigen::Matrix<double, 4, 1> > >, std::vector<Eigen::Matrix<double, 3, 1> >, double)’:
  /tmp/pip-req-build-t9plrora/generalized_absolute_pose.cc:263:22: error: ‘class colmap::GP3PEstimator’ has no member named ‘residual_type’
    263 |     ransac.estimator.residual_type = GP3PEstimator::ResidualType::ReprojectionError;
        |                      ^~~~~~~~~~~~~
  /tmp/pip-req-build-t9plrora/generalized_absolute_pose.cc:263:53: error: ‘colmap::GP3PEstimator::ResidualType’ has not been declared
    263 |     ransac.estimator.residual_type = GP3PEstimator::ResidualType::ReprojectionError;
        |                                                     ^~~~~~~~~~~~
  make[2]: *** [CMakeFiles/pycolmap.dir/build.make:82: CMakeFiles/pycolmap.dir/main.cc.o] Error 1
  make[1]: *** [CMakeFiles/Makefile2:115: CMakeFiles/pycolmap.dir/all] Error 2
  make: *** [Makefile:103: all] Error 2
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-req-build-t9plrora/setup.py", line 77, in <module>
      zip_safe=False,
    File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/tmp/pip-req-build-t9plrora/setup.py", line 32, in run
      self.build_extension(ext)
    File "/tmp/pip-req-build-t9plrora/setup.py", line 66, in build_extension
      subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
    File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/subprocess.py", line 363, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
  ----------------------------------------
  ERROR: Failed building wheel for pycolmap
  Running setup.py clean for pycolmap
Failed to build pycolmap
Installing collected packages: pycolmap
    Running setup.py install for pycolmap ... error
    ERROR: Command errored out with exit status 1:
     command: /home/gabby-suwichaya/anaconda3/envs/immatch/bin/python3.7 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-t9plrora/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-t9plrora/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-k0kleznn/install-record.txt --single-version-externally-managed --compile --install-headers /home/gabby-suwichaya/anaconda3/envs/immatch/include/python3.7m/pycolmap
         cwd: /tmp/pip-req-build-t9plrora/
    Complete output (145 lines):
    running install
    running build
    running build_ext
    ['cmake', '/tmp/pip-req-build-t9plrora', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-req-build-t9plrora/build/lib.linux-x86_64-3.7', '-DPYTHON_EXECUTABLE=/home/gabby-suwichaya/anaconda3/envs/immatch/bin/python3.7', '-DCMAKE_BUILD_TYPE=Release']
    -- The C compiler identification is GNU 9.3.0
    -- The CXX compiler identification is GNU 9.3.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /usr/bin/cc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Looking for pthread.h
    -- Looking for pthread.h - found
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
    -- Looking for pthread_create in pthreads
    -- Looking for pthread_create in pthreads - not found
    -- Looking for pthread_create in pthread
    -- Looking for pthread_create in pthread - found
    -- Found Threads: TRUE
    -- Found required Ceres dependency: Eigen version 3.3.7 in /usr/include/eigen3
    -- Found required Ceres dependency: glog
    -- Found required Ceres dependency: gflags
    -- Found Ceres version: 2.0.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations, Multithreading]
    -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: program_options filesystem system unit_test_framework
    -- Found Eigen3: /usr/include/eigen3 (Required is at least version "2.91.0")
    -- Found Eigen
    --   Includes : /usr/include/eigen3
    -- Found FreeImage
    --   Includes : /usr/include
    --   Libraries : /usr/lib/x86_64-linux-gnu/libfreeimage.so
    -- Found Glog
    --   Includes : /usr/include
    --   Libraries : /usr/lib/x86_64-linux-gnu/libglog.so
    CMake Warning (dev) at /home/gabby-suwichaya/anaconda3/share/cmake-3.18/Modules/FindOpenGL.cmake:305 (message):
      Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
      available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
      cmake_policy command to set the policy and suppress this warning.
    
      FindOpenGL found both a legacy GL library:
    
        OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so
    
      and GLVND libraries for OpenGL and GLX:
    
        OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
        OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so
    
      OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
      compatibility with CMake 3.10 and below the legacy GL library will be used.
    Call Stack (most recent call first):
      /usr/local/share/colmap/COLMAPConfig.cmake:103 (find_package)
      CMakeLists.txt:6 (find_package)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    -- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    -- Found Glew
    --   Includes : /usr/include
    --   Libraries : /usr/lib/x86_64-linux-gnu/libGLEW.so
    -- Using header-only CGAL
    -- Targetting Unix Makefiles
    -- Using /usr/bin/c++ compiler.
    -- Found GMP: /usr/lib/x86_64-linux-gnu/libgmp.so
    -- Found MPFR: /usr/lib/x86_64-linux-gnu/libmpfr.so
    -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.48")
    -- Boost include dirs: /usr/include
    -- Boost libraries:
    -- Using gcc version 4 or later. Adding -frounding-math
    -- Found PythonInterp: /home/gabby-suwichaya/anaconda3/envs/immatch/bin/python3.7 (found version "3.7.10")
    -- Found PythonLibs: /home/gabby-suwichaya/anaconda3/envs/immatch/lib/libpython3.7m.so
    -- Performing Test HAS_CPP14_FLAG
    -- Performing Test HAS_CPP14_FLAG - Success
    -- pybind11 v2.5.dev1
    -- Performing Test HAS_FLTO
    -- Performing Test HAS_FLTO - Success
    -- LTO enabled
    -- Configuring done
    CMake Warning at pybind11/tools/pybind11Tools.cmake:131 (add_library):
      Cannot generate a safe runtime search path for target pycolmap because
      files in some directories may conflict with libraries in implicit
      directories:
    
        runtime library [libgmp.so.10] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
          /home/gabby-suwichaya/anaconda3/envs/immatch/lib
        runtime library [liblapack.so.3] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
          /home/gabby-suwichaya/anaconda3/envs/immatch/lib
    
      Some of these libraries may not be found correctly.
    Call Stack (most recent call first):
      CMakeLists.txt:12 (pybind11_add_module)
    
    
    -- Generating done
    -- Build files have been written to: /tmp/pip-req-build-t9plrora/build/temp.linux-x86_64-3.7
    Scanning dependencies of target pycolmap
    [ 50%] Building CXX object CMakeFiles/pycolmap.dir/main.cc.o
    In file included from /tmp/pip-req-build-t9plrora/main.cc:6:
    /tmp/pip-req-build-t9plrora/generalized_absolute_pose.cc: In function ‘pybind11::dict rig_absolute_pose_estimation(std::vector<std::vector<Eigen::Matrix<double, 2, 1>, std::allocator<Eigen::Matrix<double, 2, 1> > > >, std::vector<std::vector<Eigen::Matrix<double, 3, 1> > >, std::vector<pybind11::dict>, std::vector<Eigen::Matrix<double, 4, 1>, std::allocator<Eigen::Matrix<double, 4, 1> > >, std::vector<Eigen::Matrix<double, 3, 1> >, double)’:
    /tmp/pip-req-build-t9plrora/generalized_absolute_pose.cc:263:22: error: ‘class colmap::GP3PEstimator’ has no member named ‘residual_type’
      263 |     ransac.estimator.residual_type = GP3PEstimator::ResidualType::ReprojectionError;
          |                      ^~~~~~~~~~~~~
    /tmp/pip-req-build-t9plrora/generalized_absolute_pose.cc:263:53: error: ‘colmap::GP3PEstimator::ResidualType’ has not been declared
      263 |     ransac.estimator.residual_type = GP3PEstimator::ResidualType::ReprojectionError;
          |                                                     ^~~~~~~~~~~~
    make[2]: *** [CMakeFiles/pycolmap.dir/build.make:82: CMakeFiles/pycolmap.dir/main.cc.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:115: CMakeFiles/pycolmap.dir/all] Error 2
    make: *** [Makefile:103: all] Error 2
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-t9plrora/setup.py", line 77, in <module>
        zip_safe=False,
      File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/tmp/pip-req-build-t9plrora/setup.py", line 32, in run
        self.build_extension(ext)
      File "/tmp/pip-req-build-t9plrora/setup.py", line 66, in build_extension
        subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
      File "/home/gabby-suwichaya/anaconda3/envs/immatch/lib/python3.7/subprocess.py", line 363, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/gabby-suwichaya/anaconda3/envs/immatch/bin/python3.7 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-t9plrora/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-t9plrora/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-k0kleznn/install-record.txt --single-version-externally-managed --compile --install-headers /home/gabby-suwichaya/anaconda3/envs/immatch/include/python3.7m/pycolmap Check the logs for full command output.

pycolmap & pycharm

i use pycharm to import pycolmap. but the init.py file has may errors. I don not know how to revise it.
1
2

Difference between SimplePinhole and Pinhole

I see that there are two types of pinhole camera models. what is the difference between the "SimplePinhole" and "Pinhole"? In case if I would like to include both fx as well as fy, should I include it in params as [fx,fy,cx,cy] or [fx,cx,fy,cy]? I would like to know its order.

What's the definition of absolute pose

Suppose the output of absolute_pose_estimation has the output as follows:
ret['qvec'], ret['tvec'].
May I ask what's the definition of qvec and tvec? I hope to have the answer like for example, qvec represents rotation from camera frame to object frame, in unit quaternion form. tvec represent translation from camera frame to object frame, expressed in camera frame.

Thanks!

About export model

I do not know how to export model using pycolmap i want to try it with hloc

image registration

I can't triangulation I don't know why. Could you guide me how to reconstruct knowing pose images correctly

Question regarding input of Pose Refinement?

Hi, I am trying to use colmap for pose correction and I end up here. I was wondering what's the length of tvec and qvec in the input? Should it be the same as the length of 2D-3D points (N)? Also, I have different intrinsics for each view. How I should feed it to pose refinement? it looks it only accept the same intrinsics for all views. Also, I don't understand exactly what's inlier_mask?

Please let me know if there is documentation for pose refinement. Thanks!

Usage according to README gives unlikely results of reprojection error

Hi,

Thanks for maintaining the package.

I'm trying to analyse the reprojection error of a simple SFM project (the south-building), but the calculated reprojection error are way too large to be true (1000+ pixels)
Is there a possible erronous usage? Code snippet is below, thanks.

import numpy as np
import pycolmap

sfm = pycolmap.Reconstruction('south-building/colmap/sparse')

for id, pt3d in sfm.points3D.items():
    for track in pt3d.track.elements:
        img = sfm.images[track.image_id]
        cam = sfm.cameras[img.camera_id]

        pt2d = img.points2D[track.point2D_idx]
        assert pt2d.point3D_id == id

        pt2d_ = cam.world_to_image(img.project(pt3d.xyz))

        rpjerr = np.linalg.norm(pt2d.xy - pt2d_)

        print(rpjerr)

Dense Reconstruction?

Very useful repo! Wondering if there is any intention to include dense reconstruction in this binding? As far as I can tell several of the functions necessary for it are not yet included (sift keypoint matching, etc), but perhaps I've just missed them.

Thanks!

Sparse reconstruction with GPU

After reading this MR, I understand that I need to build COLMAP manually to have CUDA support, and that I will be able to use CUDA in feature extraction and matching.

But I'm not sure if CUDA can be utilized also in sparse reconstruction? From what is see during the execution, CUDA is not utilized during the sparse reconstruction?

Install pycolmap error:` Could not find a package configuration file provided by "COLMAP" with any of the following names:`

@mihaidusmanu Hi, I install the pycolmap in Ubuntu18.04. However, the following mistakes occurred in the process of installation. Now I do not know how to solve this problem. Could you please give me some suggestions

(base) shl@zhihui-mint:~/shl_res/pycolmap$ pip install ./
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Processing /home/shl/shl_res/pycolmap
Building wheels for collected packages: pycolmap
  Building wheel for pycolmap (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/shl/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-8w46f1k6/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-8w46f1k6/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-koabs48h
       cwd: /tmp/pip-req-build-8w46f1k6/
  Complete output (37 lines):
  running bdist_wheel
  running build
  running build_ext
  ['cmake', '/tmp/pip-req-build-8w46f1k6', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-req-build-8w46f1k6/build/lib.linux-x86_64-3.8', '-DPYTHON_EXECUTABLE=/home/shl/anaconda3/bin/python', '-DCMAKE_BUILD_TYPE=Release']
  CMake Error: The current CMakeCache.txt directory /tmp/pip-req-build-8w46f1k6/build/temp.linux-x86_64-3.8/CMakeCache.txt is different than the directory /home/shl/shl_res/pycolmap/build/temp.linux-x86_64-3.8 where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
  CMake Error: The source "/tmp/pip-req-build-8w46f1k6/CMakeLists.txt" does not match the source "/home/shl/shl_res/pycolmap/CMakeLists.txt" used to generate cache.  Re-run cmake with a different source directory.
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-req-build-8w46f1k6/setup.py", line 62, in <module>
      setup(
    File "/home/shl/anaconda3/lib/python3.8/site-packages/setuptools/__init__.py", line 165, in setup
      return distutils.core.setup(**attrs)
    File "/home/shl/anaconda3/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/home/shl/anaconda3/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/home/shl/anaconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/shl/anaconda3/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 223, in run
      self.run_command('build')
    File "/home/shl/anaconda3/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/shl/anaconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/shl/anaconda3/lib/python3.8/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/home/shl/anaconda3/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/shl/anaconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/tmp/pip-req-build-8w46f1k6/setup.py", line 32, in run
      self.build_extension(ext)
    File "/tmp/pip-req-build-8w46f1k6/setup.py", line 59, in build_extension
      subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
    File "/home/shl/anaconda3/lib/python3.8/subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-req-build-8w46f1k6', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-req-build-8w46f1k6/build/lib.linux-x86_64-3.8', '-DPYTHON_EXECUTABLE=/home/shl/anaconda3/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for pycolmap
  Running setup.py clean for pycolmap
Failed to build pycolmap
Installing collected packages: pycolmap
    Running setup.py install for pycolmap ... error
    ERROR: Command errored out with exit status 1:
     command: /home/shl/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-8w46f1k6/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-8w46f1k6/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-uj1mpfls/install-record.txt --single-version-externally-managed --compile --install-headers /home/shl/anaconda3/include/python3.8/pycolmap
         cwd: /tmp/pip-req-build-8w46f1k6/
    Complete output (70 lines):
    running install
    running build
    running build_ext
    ['cmake', '/tmp/pip-req-build-8w46f1k6', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-req-build-8w46f1k6/build/lib.linux-x86_64-3.8', '-DPYTHON_EXECUTABLE=/home/shl/anaconda3/bin/python', '-DCMAKE_BUILD_TYPE=Release']
    -- The C compiler identification is GNU 7.5.0
    -- The CXX compiler identification is GNU 7.5.0
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    CMake Error at CMakeLists.txt:6 (find_package):
      By not providing "FindCOLMAP.cmake" in CMAKE_MODULE_PATH this project has
      asked CMake to find a package configuration file provided by "COLMAP", but
      CMake did not find one.
    
      Could not find a package configuration file provided by "COLMAP" with any
      of the following names:
    
        COLMAPConfig.cmake
        colmap-config.cmake
    
      Add the installation prefix of "COLMAP" to CMAKE_PREFIX_PATH or set
      "COLMAP_DIR" to a directory containing one of the above files.  If "COLMAP"
      provides a separate development package or SDK, be sure it has been
      installed.
    
    
    -- Configuring incomplete, errors occurred!
    See also "/tmp/pip-req-build-8w46f1k6/build/temp.linux-x86_64-3.8/CMakeFiles/CMakeOutput.log".
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-8w46f1k6/setup.py", line 62, in <module>
        setup(
      File "/home/shl/anaconda3/lib/python3.8/site-packages/setuptools/__init__.py", line 165, in setup
        return distutils.core.setup(**attrs)
      File "/home/shl/anaconda3/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/home/shl/anaconda3/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/home/shl/anaconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/home/shl/anaconda3/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/home/shl/anaconda3/lib/python3.8/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/home/shl/anaconda3/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/home/shl/anaconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/home/shl/anaconda3/lib/python3.8/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/home/shl/anaconda3/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/home/shl/anaconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/tmp/pip-req-build-8w46f1k6/setup.py", line 32, in run
        self.build_extension(ext)
      File "/tmp/pip-req-build-8w46f1k6/setup.py", line 59, in build_extension
        subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
      File "/home/shl/anaconda3/lib/python3.8/subprocess.py", line 364, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-req-build-8w46f1k6', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-req-build-8w46f1k6/build/lib.linux-x86_64-3.8', '-DPYTHON_EXECUTABLE=/home/shl/anaconda3/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/shl/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-8w46f1k6/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-8w46f1k6/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-uj1mpfls/install-record.txt --single-version-externally-managed --compile --install-headers /home/shl/anaconda3/include/python3.8/pycolmap Check the logs for full command output.
(base) shl@zhihui-mint:~/shl_res/pycolmap$ 

Installation error: Could not find a package configuration file provided by "Qt5" with any of the following names:

Hi. Thank you for the great work!

I have found this error when installing pycolmap. I have confirmed that COLMAP is installed. I have tried everything mentioned in StackOverflow to no avail.

I am using M1 MacBook Pro.

Here are the error from Terminal:

Processing /Users/yopiprabowooktiovan/Desktop/Projects/pycolmap
Building wheels for collected packages: pycolmap
Building wheel for pycolmap (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/setup.py'"'"'; file='"'"'/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-wheel-vwndny11
cwd: /private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/
Complete output (100 lines):
running bdist_wheel
running build
running build_ext
['cmake', '/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/build/lib.macosx-10.9-x86_64-3.8', '-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8', '-DCMAKE_BUILD_TYPE=Release']
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found required Ceres dependency: Eigen version 3.3.9 in /usr/local/include/eigen3
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.0.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, AccelerateSparse, SchurSpecializations, Multithreading]
-- Found Boost: /usr/local/lib/cmake/Boost-1.75.0/BoostConfig.cmake (found version "1.75.0") found components: program_options filesystem system unit_test_framework
-- Found Eigen3: /usr/local/include/eigen3 (Required is at least version "2.91.0")
-- Found Eigen
-- Includes : /usr/local/include/eigen3
-- Found FreeImage
-- Includes : /usr/local/include
-- Libraries : /usr/local/lib/libfreeimage.dylib
-- Found Glog
-- Includes : /usr/local/include
-- Libraries : /usr/local/lib/libglog.dylib
-- Found OpenGL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/OpenGL.framework
-- Found Glew
-- Includes : /usr/local/include
-- Libraries : /usr/local/lib/libGLEW.dylib
CMake Error at /usr/local/share/colmap/COLMAPConfig.cmake:106 (find_package):
By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5", but
CMake did not find one.

Could not find a package configuration file provided by "Qt5" (requested
version 5.4) with any of the following names:

  Qt5Config.cmake
  qt5-config.cmake

Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
to a directory containing one of the above files.  If "Qt5" provides a
separate development package or SDK, be sure it has been installed.

Call Stack (most recent call first):
CMakeLists.txt:7 (find_package)

CMake Error at CMakeLists.txt:7 (find_package):
Found package configuration file:

  /usr/local/share/colmap/COLMAPConfig.cmake

but it set COLMAP_FOUND to FALSE so package "COLMAP" is considered to be
NOT FOUND.

-- Configuring incomplete, errors occurred!
See also "/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/build/temp.macosx-10.9-x86_64-3.8/CMakeFiles/CMakeOutput.log".
See also "/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/build/temp.macosx-10.9-x86_64-3.8/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/setup.py", line 62, in
setup(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/init.py", line 165, in setup
return distutils.core.setup(**attrs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/setup.py", line 32, in run
self.build_extension(ext)
File "/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/setup.py", line 59, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/build/lib.macosx-10.9-x86_64-3.8', '-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.

ERROR: Failed building wheel for pycolmap
Running setup.py clean for pycolmap
Failed to build pycolmap
Installing collected packages: pycolmap
Running setup.py install for pycolmap ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/setup.py'"'"'; file='"'"'/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-record-eifp479z/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pycolmap
cwd: /private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/
Complete output (102 lines):
running install
running build
running build_ext
['cmake', '/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/build/lib.macosx-10.9-x86_64-3.8', '-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8', '-DCMAKE_BUILD_TYPE=Release']
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found required Ceres dependency: Eigen version 3.3.9 in /usr/local/include/eigen3
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.0.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, AccelerateSparse, SchurSpecializations, Multithreading]
-- Found Boost: /usr/local/lib/cmake/Boost-1.75.0/BoostConfig.cmake (found version "1.75.0") found components: program_options filesystem system unit_test_framework
-- Found Eigen3: /usr/local/include/eigen3 (Required is at least version "2.91.0")
-- Found Eigen
-- Includes : /usr/local/include/eigen3
-- Found FreeImage
-- Includes : /usr/local/include
-- Libraries : /usr/local/lib/libfreeimage.dylib
-- Found Glog
-- Includes : /usr/local/include
-- Libraries : /usr/local/lib/libglog.dylib
-- Found OpenGL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/OpenGL.framework
-- Found Glew
-- Includes : /usr/local/include
-- Libraries : /usr/local/lib/libGLEW.dylib
CMake Error at /usr/local/share/colmap/COLMAPConfig.cmake:106 (find_package):
By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5", but
CMake did not find one.

  Could not find a package configuration file provided by "Qt5" (requested
  version 5.4) with any of the following names:

    Qt5Config.cmake
    qt5-config.cmake

  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:7 (find_package)


CMake Error at CMakeLists.txt:7 (find_package):
  Found package configuration file:

    /usr/local/share/colmap/COLMAPConfig.cmake

  but it set COLMAP_FOUND to FALSE so package "COLMAP" is considered to be
  NOT FOUND.


-- Configuring incomplete, errors occurred!
See also "/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/build/temp.macosx-10.9-x86_64-3.8/CMakeFiles/CMakeOutput.log".
See also "/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/build/temp.macosx-10.9-x86_64-3.8/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/setup.py", line 62, in <module>
    setup(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 165, in setup
    return distutils.core.setup(**attrs)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/install.py", line 545, in run
    self.run_command('build')
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/setup.py", line 32, in run
    self.build_extension(ext)
  File "/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/setup.py", line 59, in build_extension
    subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/build/lib.macosx-10.9-x86_64-3.8', '-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
----------------------------------------

ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/setup.py'"'"'; file='"'"'/private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-req-build-qx4m3ciu/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/79/z2wsfkyj2vs8hp7nb62rv9vm0000gn/T/pip-record-eifp479z/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pycolmap Check the logs for full command output.

Missing mask path in ImageReaderOptions

Hi,
I wanted to provide mask path for feature extraction, but there was no option for it in ImageReaderOptions. However camera_mask_path was defined not sure how different it is from mask_path since I am used to using mask_path in colmap.
Also wanted to point out that max_num_features is defined twice in SiftExtractionOptions.
Thank you in advance for the help

Default value of parameter

Hi @mihaidusmanu , thanks for the Excellent tool.
I find that the default value of parameter "max_error_px" in function "absolute_pose_estimation" is 12.0, however it is 4.0 in function "essential_matrix_estimation" and "fundamental_matrix_estimation".
`// Absolute pose.
m.def("absolute_pose_estimation", &absolute_pose_estimation,
py::arg("points2D"), py::arg("points3D"),
py::arg("camera_dict"),
py::arg("max_error_px") = 12.0,
"Absolute pose estimation with non-linear refinement.");

// Essential matrix.
m.def("essential_matrix_estimation", &essential_matrix_estimation,
      py::arg("points2D1"), py::arg("points2D2"),
      py::arg("camera_dict1"), py::arg("camera_dict2"),
      py::arg("max_error_px") = 4.0,
      "LORANSAC + 5-point algorithm.");

// Fundamental matrix.
m.def("fundamental_matrix_estimation", &fundamental_matrix_estimation,
      py::arg("points2D1"), py::arg("points2D2"),
      py::arg("max_error_px") = 4.0,
      "LORANSAC + 7-point algorithm.");`

I would like to know why the default value of "max_error_px" is so big in function "absolute_pose_estimation".
Hope to hear from you soon. Thank you so much!

ERROR: Failed building wheel for pycolmap [Windows 10]

While building pycolmap as instrcuted in the readme, it always throws long build error message indicating build failure.

Build Failure log

Processing c:\dev\pycolmap
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pycolmap
  Building wheel for pycolmap (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [229 lines of output]
      running bdist_wheel
      running build
      running build_ext
      C:\dev\pycolmap\setup.py:29: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        cmake_version = LooseVersion(re.search(r'version\s*([\d.]+)', out.decode()).group(1))
      -- Building for: Visual Studio 16 2019
      -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
      -- The C compiler identification is MSVC 19.29.30146.0
      -- The CXX compiler identification is MSVC 19.29.30146.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
      -- Looking for pthread_create in pthreads
      -- Looking for pthread_create in pthreads - not found
      -- Looking for pthread_create in pthread
      -- Looking for pthread_create in pthread - not found
      -- Check if compiler accepts -pthread
      -- Check if compiler accepts -pthread - no
      -- Found Threads: TRUE
      -- Looking for sgemm_
      -- Looking for sgemm_ - not found
      -- Looking for sgemm_
      -- Looking for sgemm_ - found
      -- Found BLAS: C:/dev/vcpkg/installed/x64-windows/debug/lib/openblas.lib
      -- Using VCPKG FindLAPACK from package 'lapack-reference'
      -- Looking for cheev_
      -- Looking for cheev_ - not found
      -- Looking for cheev_
      -- Looking for cheev_ - not found
      -- Looking for cheev_
      -- Looking for cheev_ - found
      -- A library with LAPACK API found.
      -- Found required Ceres dependency: Eigen version 3.4.0 in C:/dev/vcpkg/installed/x64-windows/share/eigen3
      -- Using VCPKG FindLAPACK from package 'lapack-reference'
      -- A library with LAPACK API found.
      -- Found Ceres version: 2.1.0 installed in: C:/dev/vcpkg/installed with components: [LAPACK, SuiteSparse, SparseLinearAlgebraLibrary, SchurSpecializations, Multithreading]
      -- Found Boost: C:/dev/vcpkg/installed/x64-windows/include (found version "1.79.0") found components: program_options filesystem system unit_test_framework
      -- Found Eigen3: C:/dev/vcpkg/installed/x64-windows/include/eigen3 (Required is at least version "2.91.0")
      -- Found Eigen
      --   Includes : C:/dev/vcpkg/installed/x64-windows/include/eigen3
      -- Found FreeImage
      --   Includes : C:/dev/vcpkg/installed/x64-windows/include
      --   Libraries : C:/dev/vcpkg/installed/x64-windows/lib/FreeImage.lib
      -- Found Metis
      --   Includes : C:/dev/vcpkg/installed/x64-windows/include
      --   Libraries : C:/dev/vcpkg/installed/x64-windows/debug/lib/metis.lib
      -- Found Glog
      --   Includes : C:/dev/vcpkg/installed/x64-windows/include
      --   Libraries : C:/dev/vcpkg/installed/x64-windows/debug/lib/glog.lib
      -- Found OpenGL: opengl32
      -- Visual Leak Detector (VLD) is not found.
      -- Using header-only CGAL
      -- Targetting Visual Studio 16 2019
      -- Target build environment supports auto-linking
      -- Using VC toolset 142.
      -- Generator uses intermediate configuration directory: $(Configuration)
      -- Found GMP: debug;C:/dev/vcpkg/installed/x64-windows/debug/lib/gmp.lib;optimized;C:/dev/vcpkg/installed/x64-windows/debug/lib/gmp.lib
      -- Found MPFR: C:/dev/vcpkg/installed/x64-windows/debug/lib/mpfr.lib
      -- Found Boost: C:/dev/vcpkg/installed/x64-windows/include (found suitable version "1.79.0", minimum required is "1.48")
      -- Boost include dirs: C:/dev/vcpkg/installed/x64-windows/include
      -- Boost libraries:
      -- pybind11 v2.8.1
      -- Found PythonInterp: D:/<path/to/anaconda/environment>/python.exe (found version "3.9.13")
      -- Found PythonLibs: D:/<path/to/anaconda/environment>/libs/python39.lib
      -- Performing Test HAS_MSVC_GL_LTCG
      -- Performing Test HAS_MSVC_GL_LTCG - Failed
      Compiling bindings without CUDA support.
      -- Configuring done
      -- Generating done
      CMake Warning:
        Manually-specified variables were not used by the project:

          VERSION_INFO


      -- Build files have been written to: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release
      Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
      Copyright (C) Microsoft Corporation. All rights reserved.

        Checking Build System
        Building Custom Rule C:/dev/pycolmap/CMakeLists.txt
      cl : command line warning D9002: ignoring unknown option '-std=c++14' [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
        main.cc
      C:\dev\pycolmap\sift.cc(159,50): warning C4244: 'argument': conversion from 'Eigen::EigenBase<Derived>::Index' to 'int', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
                with
                [
                    Derived=Eigen::Ref<const Eigen::Matrix<float,-1,-1,1,-1,-1>,0,Eigen::OuterStride<-1>>
                ]
      C:\dev\pycolmap\sift.cc(158,50): warning C4244: 'argument': conversion from 'Eigen::EigenBase<Derived>::Index' to 'int', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
                with
                [
                    Derived=Eigen::Ref<const Eigen::Matrix<float,-1,-1,1,-1,-1>,0,Eigen::OuterStride<-1>>
                ]
      C:\dev\pycolmap\sift.cc(221,55): warning C4244: '=': conversion from 'double' to 'float', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\reconstruction/image.cc(50,62): warning C4267: 'argument': conversion from 'size_t' to 'const colmap::camera_t', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\helpers.h(70,63): warning C4101: 'ex': unreferenced local variable [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\estimators/absolute_pose.cc(183): message : see reference to function template instantiation 'void make_dataclass<colmap::AbsolutePoseEstimationOptions>(pybind11::class_<colmap::AbsolutePoseEstimationOptions>)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xmemory(681,1): warning C4267: 'argument': conversion from 'size_t' to 'const colmap::point2D_t', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector(713): message : see reference to function template instantiation 'void std::_Default_allocator_traits<_Alloc>::construct<_Ty,size_t&,size_t&>(_Alloc &,_Objty *const ,size_t &,size_t &)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
                with
                [
                    _Alloc=std::allocator<colmap::FeatureMatch>,
                    _Ty=colmap::FeatureMatch,
                    _Objty=colmap::FeatureMatch
                ]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector(713): message : see reference to function template instantiation 'void std::_Default_allocator_traits<_Alloc>::construct<_Ty,size_t&,size_t&>(_Alloc &,_Objty *const ,size_t &,size_t &)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
                with
                [
                    _Alloc=std::allocator<colmap::FeatureMatch>,
                    _Ty=colmap::FeatureMatch,
                    _Objty=colmap::FeatureMatch
                ]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector(731): message : see reference to function template instantiation 'void std::vector<colmap::FeatureMatch,std::allocator<colmap::FeatureMatch>>::_Emplace_back_with_unused_capacity<size_t&,size_t&>(size_t &,size_t &)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\estimators/two_view_geometry.cc(45): message : see reference to function template instantiation 'void std::vector<colmap::FeatureMatch,std::allocator<colmap::FeatureMatch>>::emplace_back<size_t&,size_t&>(size_t &,size_t &)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
           Creating library C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/Release/pycolmap.lib and object C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/Release/pycolmap.exp
      LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_malloc_init referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_malloc_init [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_malloc_cleanup referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_malloc_cleanup [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(mincover.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(graph.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(options.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(minconn.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(contig.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(debug.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kwayfm.c.obj) : error LNK2019: unresolved external symbol gk_errexit referenced in function libmetis__Greedy_KWayCutOptimize [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(minconn.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(srefine.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kwayrefine.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(options.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(initpart.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(coarsen.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(contig.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(graph.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_sigtrap referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_sigtrap [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_siguntrap referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_siguntrap [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_log2 referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(initpart.c.obj) : error LNK2019: unresolved external symbol gk_CPUSeconds referenced in function GrowBisectionNode2 [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(refine.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(sfm.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(srefine.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(coarsen.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kwayrefine.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_cur_jbufs [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_cur_jbufs [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_jbufs [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_jbufs [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_idxsmalloc referenced in function libmetis__ipqInit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(initpart.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(srefine.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(graph.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kwayrefine.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(options.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_realloc referenced in function libmetis__irealloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_realloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_randinit referenced in function libmetis__isrand [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_randint64 referenced in function libmetis__irand [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_randint32 referenced in function libmetis__irand [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(graph.c.obj) : error LNK2019: unresolved external symbol gk_rmpath referenced in function libmetis__graph_WriteToDisk [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcoreCreate referenced in function libmetis__AllocateWorkSpace [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcoreDestroy referenced in function libmetis__FreeWorkSpace [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcoreMalloc referenced in function libmetis__wspacemalloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcorePush referenced in function libmetis__wspacepush [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcorePop referenced in function libmetis__wspacepop [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\build\lib.win-amd64-cpython-39\pycolmap.cp39-win_amd64.pyd : fatal error LNK1120: 22 unresolved externals [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\dev\pycolmap\setup.py", line 80, in <module>
          setup(
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\core.py", line 177, in setup
          return run_commands(dist)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\core.py", line 193, in run_commands
          dist.run_commands()
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\dist.py", line 968, in run_commands
          self.run_command(cmd)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\dist.py", line 1229, in run_command
          super().run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "D:\<path\to\anaconda\environment>lib\site-packages\wheel\bdist_wheel.py", line 290, in run
          self.run_command('build')
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\cmd.py", line 317, in run_command
          self.distribution.run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\dist.py", line 1229, in run_command
          super().run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\command\build.py", line 24, in run
          super().run()
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
          self.run_command(cmd_name)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\cmd.py", line 317, in run_command
          self.distribution.run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\dist.py", line 1229, in run_command
          super().run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "C:\dev\pycolmap\setup.py", line 34, in run
          self.build_extension(ext)
        File "C:\dev\pycolmap\setup.py", line 77, in build_extension
          subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
        File "D:\<path\to\anaconda\environment>lib\subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1.
      ['cmake', 'C:\\dev\\pycolmap', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\dev\\pycolmap\\build\\lib.win-amd64-cpython-39', '-DPYTHON_EXECUTABLE=D:\\<path\\to\\anaconda\\environment>\\python.exe', '-DVERSION_INFO=0.2.0', '-DCMAKE_TOOLCHAIN_FILE=C:\\dev\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\dev\\pycolmap\\build\\lib.win-amd64-cpython-39', '-DVCPKG_TARGET_TRIPLET=x64-windows', '-A', 'x64']
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycolmap
  Running setup.py clean for pycolmap
Failed to build pycolmap
WARNING: Error parsing requirements for jupyterthemes: [Errno 2] No such file or directory: 'd:\\<path\\to\\anaconda\\environment>\\lib\\site-packages\\jupyterthemes-0.20.0.dist-info\\METADATA'
Installing collected packages: pycolmap
  Running setup.py install for pycolmap ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pycolmap did not run successfully.
  │ exit code: 1
  ╰─> [233 lines of output]
      running install
      D:\<path\to\anaconda\environment>lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_ext
      C:\dev\pycolmap\setup.py:29: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        cmake_version = LooseVersion(re.search(r'version\s*([\d.]+)', out.decode()).group(1))
      -- Building for: Visual Studio 16 2019
      -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
      -- The C compiler identification is MSVC 19.29.30146.0
      -- The CXX compiler identification is MSVC 19.29.30146.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
      -- Looking for pthread_create in pthreads
      -- Looking for pthread_create in pthreads - not found
      -- Looking for pthread_create in pthread
      -- Looking for pthread_create in pthread - not found
      -- Check if compiler accepts -pthread
      -- Check if compiler accepts -pthread - no
      -- Found Threads: TRUE
      -- Looking for sgemm_
      -- Looking for sgemm_ - not found
      -- Looking for sgemm_
      -- Looking for sgemm_ - found
      -- Found BLAS: C:/dev/vcpkg/installed/x64-windows/debug/lib/openblas.lib
      -- Using VCPKG FindLAPACK from package 'lapack-reference'
      -- Looking for cheev_
      -- Looking for cheev_ - not found
      -- Looking for cheev_
      -- Looking for cheev_ - not found
      -- Looking for cheev_
      -- Looking for cheev_ - found
      -- A library with LAPACK API found.
      -- Found required Ceres dependency: Eigen version 3.4.0 in C:/dev/vcpkg/installed/x64-windows/share/eigen3
      -- Using VCPKG FindLAPACK from package 'lapack-reference'
      -- A library with LAPACK API found.
      -- Found Ceres version: 2.1.0 installed in: C:/dev/vcpkg/installed with components: [LAPACK, SuiteSparse, SparseLinearAlgebraLibrary, SchurSpecializations, Multithreading]
      -- Found Boost: C:/dev/vcpkg/installed/x64-windows/include (found version "1.79.0") found components: program_options filesystem system unit_test_framework
      -- Found Eigen3: C:/dev/vcpkg/installed/x64-windows/include/eigen3 (Required is at least version "2.91.0")
      -- Found Eigen
      --   Includes : C:/dev/vcpkg/installed/x64-windows/include/eigen3
      -- Found FreeImage
      --   Includes : C:/dev/vcpkg/installed/x64-windows/include
      --   Libraries : C:/dev/vcpkg/installed/x64-windows/lib/FreeImage.lib
      -- Found Metis
      --   Includes : C:/dev/vcpkg/installed/x64-windows/include
      --   Libraries : C:/dev/vcpkg/installed/x64-windows/debug/lib/metis.lib
      -- Found Glog
      --   Includes : C:/dev/vcpkg/installed/x64-windows/include
      --   Libraries : C:/dev/vcpkg/installed/x64-windows/debug/lib/glog.lib
      -- Found OpenGL: opengl32
      -- Visual Leak Detector (VLD) is not found.
      -- Using header-only CGAL
      -- Targetting Visual Studio 16 2019
      -- Target build environment supports auto-linking
      -- Using VC toolset 142.
      -- Generator uses intermediate configuration directory: $(Configuration)
      -- Found GMP: debug;C:/dev/vcpkg/installed/x64-windows/debug/lib/gmp.lib;optimized;C:/dev/vcpkg/installed/x64-windows/debug/lib/gmp.lib
      -- Found MPFR: C:/dev/vcpkg/installed/x64-windows/debug/lib/mpfr.lib
      -- Found Boost: C:/dev/vcpkg/installed/x64-windows/include (found suitable version "1.79.0", minimum required is "1.48")
      -- Boost include dirs: C:/dev/vcpkg/installed/x64-windows/include
      -- Boost libraries:
      -- pybind11 v2.8.1
      -- Found PythonInterp: D:/<path/to/anaconda/environment>/python.exe (found version "3.9.13")
      -- Found PythonLibs: D:/<path/to/anaconda/environment>/libs/python39.lib
      -- Performing Test HAS_MSVC_GL_LTCG
      -- Performing Test HAS_MSVC_GL_LTCG - Failed
      Compiling bindings without CUDA support.
      -- Configuring done
      -- Generating done
      CMake Warning:
        Manually-specified variables were not used by the project:

          VERSION_INFO


      -- Build files have been written to: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release
      Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
      Copyright (C) Microsoft Corporation. All rights reserved.

        Checking Build System
        Building Custom Rule C:/dev/pycolmap/CMakeLists.txt
      cl : command line warning D9002: ignoring unknown option '-std=c++14' [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
        main.cc
      C:\dev\pycolmap\sift.cc(159,50): warning C4244: 'argument': conversion from 'Eigen::EigenBase<Derived>::Index' to 'int', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
                with
                [
                    Derived=Eigen::Ref<const Eigen::Matrix<float,-1,-1,1,-1,-1>,0,Eigen::OuterStride<-1>>
                ]
      C:\dev\pycolmap\sift.cc(158,50): warning C4244: 'argument': conversion from 'Eigen::EigenBase<Derived>::Index' to 'int', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
                with
                [
                    Derived=Eigen::Ref<const Eigen::Matrix<float,-1,-1,1,-1,-1>,0,Eigen::OuterStride<-1>>
                ]
      C:\dev\pycolmap\sift.cc(221,55): warning C4244: '=': conversion from 'double' to 'float', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\reconstruction/image.cc(50,62): warning C4267: 'argument': conversion from 'size_t' to 'const colmap::camera_t', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\helpers.h(70,63): warning C4101: 'ex': unreferenced local variable [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\estimators/absolute_pose.cc(183): message : see reference to function template instantiation 'void make_dataclass<colmap::AbsolutePoseEstimationOptions>(pybind11::class_<colmap::AbsolutePoseEstimationOptions>)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xmemory(681,1): warning C4267: 'argument': conversion from 'size_t' to 'const colmap::point2D_t', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector(713): message : see reference to function template instantiation 'void std::_Default_allocator_traits<_Alloc>::construct<_Ty,size_t&,size_t&>(_Alloc &,_Objty *const ,size_t &,size_t &)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
                with
                [
                    _Alloc=std::allocator<colmap::FeatureMatch>,
                    _Ty=colmap::FeatureMatch,
                    _Objty=colmap::FeatureMatch
                ]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector(713): message : see reference to function template instantiation 'void std::_Default_allocator_traits<_Alloc>::construct<_Ty,size_t&,size_t&>(_Alloc &,_Objty *const ,size_t &,size_t &)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
                with
                [
                    _Alloc=std::allocator<colmap::FeatureMatch>,
                    _Ty=colmap::FeatureMatch,
                    _Objty=colmap::FeatureMatch
                ]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector(731): message : see reference to function template instantiation 'void std::vector<colmap::FeatureMatch,std::allocator<colmap::FeatureMatch>>::_Emplace_back_with_unused_capacity<size_t&,size_t&>(size_t &,size_t &)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\estimators/two_view_geometry.cc(45): message : see reference to function template instantiation 'void std::vector<colmap::FeatureMatch,std::allocator<colmap::FeatureMatch>>::emplace_back<size_t&,size_t&>(size_t &,size_t &)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
           Creating library C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/Release/pycolmap.lib and object C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/Release/pycolmap.exp
      LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_malloc_init referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_malloc_init [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_malloc_cleanup referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_malloc_cleanup [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(mincover.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(graph.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(options.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(minconn.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(contig.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(debug.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kwayfm.c.obj) : error LNK2019: unresolved external symbol gk_errexit referenced in function libmetis__Greedy_KWayCutOptimize [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(minconn.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(srefine.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kwayrefine.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(options.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(initpart.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(coarsen.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(contig.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(graph.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_sigtrap referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_sigtrap [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_siguntrap referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_siguntrap [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_log2 referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(initpart.c.obj) : error LNK2019: unresolved external symbol gk_CPUSeconds referenced in function GrowBisectionNode2 [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(refine.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(sfm.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(srefine.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(coarsen.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kwayrefine.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_cur_jbufs [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_cur_jbufs [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_jbufs [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_jbufs [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_idxsmalloc referenced in function libmetis__ipqInit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(initpart.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(srefine.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(graph.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kwayrefine.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(options.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_realloc referenced in function libmetis__irealloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_realloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_randinit referenced in function libmetis__isrand [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_randint64 referenced in function libmetis__irand [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_randint32 referenced in function libmetis__irand [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(graph.c.obj) : error LNK2019: unresolved external symbol gk_rmpath referenced in function libmetis__graph_WriteToDisk [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcoreCreate referenced in function libmetis__AllocateWorkSpace [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcoreDestroy referenced in function libmetis__FreeWorkSpace [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcoreMalloc referenced in function libmetis__wspacemalloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcorePush referenced in function libmetis__wspacepush [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcorePop referenced in function libmetis__wspacepop [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\build\lib.win-amd64-cpython-39\pycolmap.cp39-win_amd64.pyd : fatal error LNK1120: 22 unresolved externals [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\dev\pycolmap\setup.py", line 80, in <module>
          setup(
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\core.py", line 177, in setup
          return run_commands(dist)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\core.py", line 193, in run_commands
          dist.run_commands()
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\dist.py", line 968, in run_commands
          self.run_command(cmd)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\dist.py", line 1229, in run_command
          super().run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\command\install.py", line 68, in run
          return orig.install.run(self)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\command\install.py", line 690, in run
          self.run_command('build')
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\cmd.py", line 317, in run_command
          self.distribution.run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\dist.py", line 1229, in run_command
          super().run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\command\build.py", line 24, in run
          super().run()
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
          self.run_command(cmd_name)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\cmd.py", line 317, in run_command
          self.distribution.run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\dist.py", line 1229, in run_command
          super().run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "C:\dev\pycolmap\setup.py", line 34, in run
          self.build_extension(ext)
        File "C:\dev\pycolmap\setup.py", line 77, in build_extension
          subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
        File "D:\<path\to\anaconda\environment>lib\subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1.
      ['cmake', 'C:\\dev\\pycolmap', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\dev\\pycolmap\\build\\lib.win-amd64-cpython-39', '-DPYTHON_EXECUTABLE=D:\\<path\\to\\anaconda\\environment>\\python.exe', '-DVERSION_INFO=0.2.0', '-DCMAKE_TOOLCHAIN_FILE=C:\\dev\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\dev\\pycolmap\\build\\lib.win-amd64-cpython-39', '-DVCPKG_TARGET_TRIPLET=x64-windows', '-A', 'x64']
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pycolmap

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

following is the CMakeError.log file that i found under pycolmap\build\ dirctory

C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeError.log
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_58046.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  src.c

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D CMAKE_HAVE_LIBC_PTHREAD /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_58046.dir\Debug\\" /Fd"cmTC_58046.dir\Debug\vc142.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\src.c"

C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\src.c(1,10): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_58046.vcxproj]



Source file was:
#include <pthread.h>

static void* test_func(void* data)
{
  return data;
}

int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_cancel(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_1e737.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  CheckFunctionExists.c

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D CHECK_FUNCTION_EXISTS=pthread_create /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_1e737.dir\Debug\\" /Fd"cmTC_1e737.dir\Debug\vc142.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\Program Files\CMake\share\cmake-3.24\Modules\CheckFunctionExists.c"

LINK : fatal error LNK1104: cannot open file 'pthreads.lib' [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_1e737.vcxproj]




Determining if the function pthread_create exists in the pthread failed with the following output:
Change Dir: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_54ff7.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  CheckFunctionExists.c

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D CHECK_FUNCTION_EXISTS=pthread_create /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_54ff7.dir\Debug\\" /Fd"cmTC_54ff7.dir\Debug\vc142.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\Program Files\CMake\share\cmake-3.24\Modules\CheckFunctionExists.c"

LINK : fatal error LNK1104: cannot open file 'pthread.lib' [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_54ff7.vcxproj]




Determining if the function sgemm_ exists failed with the following output:
Change Dir: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_f0573.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  CheckFunctionExists.c

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D CHECK_FUNCTION_EXISTS=sgemm_ /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_f0573.dir\Debug\\" /Fd"cmTC_f0573.dir\Debug\vc142.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\Program Files\CMake\share\cmake-3.24\Modules\CheckFunctionExists.c"

CheckFunctionExists.obj : error LNK2019: unresolved external symbol sgemm_ referenced in function main [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_f0573.vcxproj]

C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\Debug\cmTC_f0573.exe : fatal error LNK1120: 1 unresolved externals [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_f0573.vcxproj]




Determining if the function cheev_ exists failed with the following output:
Change Dir: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_824fb.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  CheckFunctionExists.c

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D CHECK_FUNCTION_EXISTS=cheev_ /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_824fb.dir\Debug\\" /Fd"cmTC_824fb.dir\Debug\vc142.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\Program Files\CMake\share\cmake-3.24\Modules\CheckFunctionExists.c"

CheckFunctionExists.obj : error LNK2019: unresolved external symbol cheev_ referenced in function main [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_824fb.vcxproj]

C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\Debug\cmTC_824fb.exe : fatal error LNK1120: 1 unresolved externals [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_824fb.vcxproj]




Determining if the function cheev_ exists failed with the following output:
Change Dir: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_a2e33.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  CheckFunctionExists.c

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D CHECK_FUNCTION_EXISTS=cheev_ /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_a2e33.dir\Debug\\" /Fd"cmTC_a2e33.dir\Debug\vc142.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\Program Files\CMake\share\cmake-3.24\Modules\CheckFunctionExists.c"

CheckFunctionExists.obj : error LNK2019: unresolved external symbol cheev_ referenced in function main [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_a2e33.vcxproj]

C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\Debug\cmTC_a2e33.exe : fatal error LNK1120: 1 unresolved externals [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_a2e33.vcxproj]




Performing C++ SOURCE FILE Test HAS_MSVC_GL_LTCG failed with the following output:
Change Dir: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_27073.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  src.cxx

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /GL /D _MBCS /D "VERSION_INFO=\"0.2.0\"" /D WIN32 /D _WINDOWS /D HAS_MSVC_GL_LTCG /D "CMAKE_INTDIR=\"Debug\"" /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /openmp /Fo"cmTC_27073.dir\Debug\\" /Fd"cmTC_27073.dir\Debug\vc142.pdb" /external:W3 /Gd /TP /errorReport:queue  -std=c++14 "C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\src.cxx"

cl : command line warning D9002: ignoring unknown option '-std=c++14' [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_27073.vcxproj]

LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_27073.vcxproj]

  Generating code

  Finished generating code

  cmTC_27073.vcxproj -> C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\Debug\cmTC_27073.exe



Source file was:
int main() { return 0; }

how to add more images to a model

After you add more images and matching features to the model's database. You can use colmap mapper --input_path model to create a new model with added images. Because it starts from an existing model, the process time usually is not very long. But pycolmap.incremental_mapping() won't take an existing model as the starting point. Is there another way to do it or should pycolmap.incremental_mapping() be modified to take an input model?

pycolmap.Image constructor fails in 0.2.0

Hi,

I observed an error that occurs for me when constructing an Image object manually:

import pycolmap

points = [pycolmap.Point2D((100, 200))]
pts = pycolmap.ListPoint2D(points)
image = pycolmap.Image("image.png", pts)

In 0.1.0 this used to work fine, while in 0.2.0 it raises the following error:

Traceback (most recent call last):
  File "image_construct.py", line 5, in <module>
    image = pycolmap.Image("image.png", pts)
RecursionError: maximum recursion depth exceeded while calling a Python object

Note that when default-constructing the object without point list it also works fine.

Environment: Python 3.8 on Ubuntu 20.04, pycolmap 0.2.0 installed from PyPi

Windows: failure for wheel building

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing c:\dev\pycolmap-master
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pycolmap
Building wheel for pycolmap (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [205 lines of output]
running bdist_wheel
running build
running build_ext
C:\dev\pycolmap-master\setup.py:29: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
cmake_version = LooseVersion(re.search(r'version\s*([\d.]+)', out.decode()).group(1))
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000.
-- Using VCPKG FindLAPACK from package 'lapack-reference'
-- A library with LAPACK API found.
-- Found required Ceres dependency: Eigen version 3.4.0 in C:/dev/vcpkg/installed/x64-windows/share/eigen3
-- Using VCPKG FindLAPACK from package 'lapack-reference'
-- A library with LAPACK API found.
-- Found Ceres version: 2.1.0 installed in: C:/dev/vcpkg/installed with components: [LAPACK, SuiteSparse, SparseLinearAlgebraLibrary, CXSparse, SchurSpecializations, Multithreading]
CMake Warning at C:/dev/vcpkg/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/share/cmake-3.22/Modules/FindBoost.cmake:1384 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/dev/vcpkg/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/share/cmake-3.22/Modules/FindBoost.cmake:1507 (_Boost_COMPONENT_DEPENDENCIES)
C:/dev/vcpkg/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/share/cmake-3.22/Modules/FindBoost.cmake:2117 (_Boost_MISSING_DEPENDENCIES)
C:/dev/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package)
C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:778 (include)
C:/dev/vcpkg/installed/x64-windows/share/colmap/COLMAPConfig.cmake:94 (find_package)
C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:824 (_find_package)
CMakeLists.txt:4 (find_package)

  CMake Warning at C:/dev/vcpkg/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/share/cmake-3.22/Modules/FindBoost.cmake:1384 (message):
    New Boost version may have incorrect or missing dependencies and imported
    targets
  Call Stack (most recent call first):
    C:/dev/vcpkg/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/share/cmake-3.22/Modules/FindBoost.cmake:1507 (_Boost_COMPONENT_DEPENDENCIES)
    C:/dev/vcpkg/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/share/cmake-3.22/Modules/FindBoost.cmake:2117 (_Boost_MISSING_DEPENDENCIES)
    C:/dev/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package)
    C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:778 (include)
    C:/dev/vcpkg/installed/x64-windows/share/colmap/COLMAPConfig.cmake:94 (find_package)
    C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:824 (_find_package)
    CMakeLists.txt:4 (find_package)


  CMake Warning at C:/dev/vcpkg/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/share/cmake-3.22/Modules/FindBoost.cmake:1384 (message):
    New Boost version may have incorrect or missing dependencies and imported
    targets
  Call Stack (most recent call first):
    C:/dev/vcpkg/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/share/cmake-3.22/Modules/FindBoost.cmake:1507 (_Boost_COMPONENT_DEPENDENCIES)
    C:/dev/vcpkg/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/share/cmake-3.22/Modules/FindBoost.cmake:2117 (_Boost_MISSING_DEPENDENCIES)
    C:/dev/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package)
    C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:778 (include)
    C:/dev/vcpkg/installed/x64-windows/share/colmap/COLMAPConfig.cmake:94 (find_package)
    C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:824 (_find_package)
    CMakeLists.txt:4 (find_package)


  CMake Warning at C:/dev/vcpkg/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/share/cmake-3.22/Modules/FindBoost.cmake:1384 (message):
    New Boost version may have incorrect or missing dependencies and imported
    targets
  Call Stack (most recent call first):
    C:/dev/vcpkg/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/share/cmake-3.22/Modules/FindBoost.cmake:1507 (_Boost_COMPONENT_DEPENDENCIES)
    C:/dev/vcpkg/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/share/cmake-3.22/Modules/FindBoost.cmake:2117 (_Boost_MISSING_DEPENDENCIES)
    C:/dev/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package)
    C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:778 (include)
    C:/dev/vcpkg/installed/x64-windows/share/colmap/COLMAPConfig.cmake:94 (find_package)
    C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:824 (_find_package)
    CMakeLists.txt:4 (find_package)


  -- Found Boost: C:/dev/vcpkg/installed/x64-windows/include (found version "1.79.0") found components: program_options filesystem system unit_test_framework
  -- Found Eigen
  --   Includes : C:/dev/vcpkg/installed/x64-windows/include/eigen3
  -- Found FreeImage
  --   Includes : C:/dev/vcpkg/installed/x64-windows/include
  --   Libraries : C:/dev/vcpkg/installed/x64-windows/lib/FreeImage.lib
  -- Found Metis
  --   Includes : C:/dev/vcpkg/installed/x64-windows/include
  --   Libraries : C:/dev/vcpkg/installed/x64-windows/debug/lib/metis.lib
  -- Found Glog
  --   Includes : C:/dev/vcpkg/installed/x64-windows/include
  --   Libraries : C:/dev/vcpkg/installed/x64-windows/debug/lib/glog.lib
  CMake Warning at C:/dev/vcpkg/installed/x64-windows/share/cgal/CGALConfig.cmake:92 (message):
    CGAL_DATA_DIR cannot be deduced, set the variable CGAL_DATA_DIR to set the
    default value of CGAL::data_file_path()
  Call Stack (most recent call first):
    C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:824 (_find_package)
    C:/dev/vcpkg/installed/x64-windows/share/colmap/COLMAPConfig.cmake:200 (find_package)
    C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:824 (_find_package)
    CMakeLists.txt:4 (find_package)


  -- Visual Leak Detector (VLD) is not found.
  -- Using header-only CGAL
  -- Targetting Visual Studio 16 2019
  -- Target build environment supports auto-linking
  -- Using VC toolset 142.
  -- Generator uses intermediate configuration directory: $(Configuration)
  -- Found Boost: C:/dev/vcpkg/installed/x64-windows/include (found suitable version "1.79.0", minimum required is "1.48")
  -- Boost include dirs: C:/dev/vcpkg/installed/x64-windows/include
  -- Boost libraries:
  -- pybind11 v2.6.2 dev1
  CMake Warning (dev) at C:/dev/vcpkg/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/share/cmake-3.22/Modules/CMakeDependentOption.cmake:84 (message):
    Policy CMP0127 is not set: cmake_dependent_option() supports full Condition
    Syntax.  Run "cmake --help-policy CMP0127" for policy details.  Use the
    cmake_policy command to set the policy and suppress this warning.
  Call Stack (most recent call first):
    pybind11/CMakeLists.txt:91 (cmake_dependent_option)
  This warning is for project developers.  Use -Wno-dev to suppress it.

  Compiling bindings without CUDA support.
  -- Configuring done
  -- Generating done
  CMake Warning:
    Manually-specified variables were not used by the project:

      CMAKE_TOOLCHAIN_FILE

……
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1.
['cmake', 'C:\dev\pycolmap-master', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\dev\pycolmap-master\build\lib.win-amd64-cpython-38', '-DPYTHON_EXECUTABLE=D:\Anaconda3\python.exe', '-DVERSION_INFO=0.2.0', '-DCMAKE_TOOLCHAIN_FILE=C:\dev\vcpkg\scripts\buildsystems\vcpkg.cmake', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\dev\pycolmap-master\build\lib.win-amd64-cpython-38', '-DVCPKG_TARGET_TRIPLET=x64-windows', '-A', 'x64']
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pycolmap

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

import error

import pycolmap
Traceback (most recent call last):
File "", line 1, in
ImportError: /home/anaconda3/envs/sfm/lib/python3.7/site-packages/pycolmap.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN5ceres7Problem25SetParameterBlockConstantEPKd

any suggestions?

Preventing focal length refinement

Hi,

is it possible to prevent pycolmap from refining the focal length specified in the database during incremental_mapping? Using the GUI I would do that by deselecting refine_focal_length

Thanks!

Some typo about readme

For v0.1.0, build from source:

And finally build PyCOLMAP:

cd pycolmap
pip install pycolmap

which is a typo, should be pip install ./, I think.

Points 3d

Thank you for the python binding :)

I have the keypoints of the two images that I have matched and also the pose information of one of the images. How do I obtain point3d for the absolute pose estimation?

colmap: command not found

Hi , I am working on the colmap on m1. When I tiried to run this code, it seems wrong as below

==== running: colmap feature_extractor --ImageReader.camera_model OPENCV --ImageReader.camera_params "" --SiftExtraction.estimate_affine_shape=true --SiftExtraction.domain_size_pooling=true --ImageReader.single_camera 1 --database_path colmap.db --image_path "images"
sh: colmap: command not found
FATAL: command failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.