Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

glomap build failed #199

Open
Open

Description

@jwd222

i have manually build colmap and poselib and used those to build glomap.

command used:
cmake .. \ -GNinja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CUDA_ARCHITECTURES=86 \ -DFETCH_COLMAP=OFF \ -DFETCH_POSELIB=OFF \ -DCOLMAP_DIR=/usr/local/share/colmap \ -DPoseLib_DIR=/usr/local/lib/cmake/PoseLib
the log that i get:
-- The C compiler identification is GNU 10.5.0
-- The CXX compiler identification is GNU 10.5.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
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found CHOLMOD headers in: /usr/include/suitesparse
-- Found CHOLMOD library: /usr/lib/x86_64-linux-gnu/libcholmod.so
-- Found Config headers in: /usr/include/suitesparse
-- Found Config library: /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so
-- 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 COLAMD headers in: /usr/include/suitesparse
-- Found COLAMD library: /usr/lib/x86_64-linux-gnu/libcolamd.so
-- Looking for shm_open in rt
-- Looking for shm_open in rt - found
-- Adding librt to SuiteSparse_config libraries (required on Linux & Unix [not OSX] if SuiteSparse is compiled with timing).
-- Found METIS: /usr/include (found version "5.1.0")
-- Looking for cholmod_metis
-- Looking for cholmod_metis - found
-- Found SuiteSparse: /usr/include/suitesparse (found version "5.10.1") found components: CHOLMOD Config AMD CAMD CCOLAMD COLAMD
-- Found required Ceres dependency: Eigen version 3.4.0 in /usr/include/eigen3
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.0.0 installed in: /usr with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations, Multithreading]
CMake Warning (dev) at cmake/FindDependencies.cmake:9 (find_package):
Policy CMP0167 is not set: The FindBoost module is removed. Run "cmake
--help-policy CMP0167" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.

Call Stack (most recent call first):
CMakeLists.txt:23 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0")
-- Configuring PoseLib...
-- Configuring PoseLib... done
-- Configuring COLMAP...
-- Enabling LSD support
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- 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
-- Target : glog::glog
-- Found SQLite3: /usr/include (found version "3.37.2")
-- 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 Git: /usr/bin/git (found version "2.34.1")
-- Found required Ceres dependency: Eigen version 3.4.0 in /usr/include/eigen3
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.0.0 installed in: /usr with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations, Multithreading]
-- Using header-only CGAL
-- Targetting Ninja
-- 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
-- Boost include dirs: /usr/include
-- Boost libraries:
-- Using gcc version 4 or later. Adding -frounding-math
-- Found CGAL
-- Includes : /usr/include
-- Libraries : CGAL
-- Enabling download support
-- The CUDA compiler identification is NVIDIA 12.6.20
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Enabling CUDA support (version: 12.6.20, archs: 86)
-- Found Qt
-- Module : /usr/lib/x86_64-linux-gnu/cmake/Qt5Core
-- Module : /usr/lib/x86_64-linux-gnu/cmake/Qt5OpenGL
-- Module : /usr/lib/x86_64-linux-gnu/cmake/Qt5Widgets
-- Enabling GUI support
-- Disabling OpenGL support
-- Enabling GPU support (OpenGL: , CUDA: ON)
-- Configuring COLMAP... done
-- Enabling CUDA support (version: 12.6.20, archs: 86)
-- Disabling ccache support
-- Configuring done (38.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/hdsl77/glomap/build

then i run ninja in the glomap/build folder and get errors:
[1/31] Building CXX object glomap/CMakeFiles/glomap.dir/estimators/relpose_estimation.cc.o
FAILED: glomap/CMakeFiles/glomap.dir/estimators/relpose_estimation.cc.o
/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_GRAPH_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCERES_EXPORT_INTERNAL_SYMBOLS -DCOLMAP_CGAL_ENABLED -DCOLMAP_CUDA_ENABLED -DCOLMAP_DOWNLOAD_ENABLED -DCOLMAP_GPU_ENABLED -DCOLMAP_GUI_ENABLED -DCOLMAP_LSD_ENABLED -DGFLAGS_IS_A_DLL=0 -DGLOG_VERSION_MAJOR=0 -DGLOG_VERSION_MINOR=4 -DGLOMAP_CUDA_ENABLED -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -DPOSELIB_DEBUG=0 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -I/home/hdsl77/glomap/glomap/.. -isystem /usr/include/eigen3 -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGL -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/local/. -isystem /usr/local/cuda/targets/x86_64-linux/include -isystem /usr/include/suitesparse -O3 -DNDEBUG -std=gnu++17 -fPIC -Wall -Werror -Wno-sign-compare -Wno-unused-variable -fopenmp -MD -MT glomap/CMakeFiles/glomap.dir/estimators/relpose_estimation.cc.o -MF glomap/CMakeFiles/glomap.dir/estimators/relpose_estimation.cc.o.d -o glomap/CMakeFiles/glomap.dir/estimators/relpose_estimation.cc.o -c /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc: In lambda function:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:73:38: error: no match for ‘operator*’ (operand types are ‘Eigen::Matrix2d’ {aka ‘Eigen::Matrix<double, 2, 2>’} and ‘std::optional<Eigen::Matrix<double, 2, 1> >’)
73 | points2D_1[idx] = K1_new * camera1.CamFromImg(points2D_1[idx]);
| ~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | std::optional<Eigen::Matrix<double, 2, 1> >
| Eigen::Matrix2d {aka Eigen::Matrix<double, 2, 2>}
In file included from /usr/include/eigen3/Eigen/Core:19,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: note: candidate: ‘template const Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<typename Eigen::internal::traits::Scalar, typename Eigen::internal::promote_scalar_arg<typename Eigen::internal::traits::Scalar, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<typename Eigen::internal::traits::Scalar, T, Eigen::internal::scalar_product_op<typename Eigen::internal::traits::Scalar, T> > >::value>::type>, const Derived, const typename Eigen::internal::plain_constant_type<Derived, typename Eigen::internal::promote_scalar_arg<typename Eigen::internal::traits::Scalar, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<typename Eigen::internal::traits::Scalar, T, Eigen::internal::scalar_product_op<typename Eigen::internal::traits::Scalar, T> > >::value>::type>::type> Eigen::MatrixBase::operator*(const T&) const [with T = T; Derived = Eigen::Matrix<double, 2, 2>]’
50 | EIGEN_MAKE_SCALAR_BINARY_OP(operator*,product)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: note: template argument deduction/substitution failed:
/usr/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h: In substitution of ‘template const Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double, typename Eigen::internal::promote_scalar_arg<double, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<double, T, Eigen::internal::scalar_product_op<double, T> > >::value>::type>, const Eigen::Matrix<double, 2, 2>, const typename Eigen::internal::plain_constant_type<Eigen::Matrix<double, 2, 2>, typename Eigen::internal::promote_scalar_arg<double, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<double, T, Eigen::internal::scalar_product_op<double, T> > >::value>::type>::type> Eigen::MatrixBase<Eigen::Matrix<double, 2, 2> >::operator*(const T&) const [with T = std::optional<Eigen::Matrix<double, 2, 1> >]’:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:73:74: required from here
/usr/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: error: no type named ‘type’ in ‘struct Eigen::internal::promote_scalar_arg<double, std::optional<Eigen::Matrix<double, 2, 1> >, false>’
In file included from /usr/include/eigen3/Eigen/Core:273,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/Core/MatrixBase.h:166:5: note: candidate: ‘template const Eigen::Product<Derived, OtherDerived> Eigen::MatrixBase::operator*(const Eigen::MatrixBase&) const [with OtherDerived = OtherDerived; Derived = Eigen::Matrix<double, 2, 2>]’
166 | operator*(const MatrixBase &other) const;
| ^~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MatrixBase.h:166:5: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:73:74: note: ‘std::optional<Eigen::Matrix<double, 2, 1> >’ is not derived from ‘const Eigen::MatrixBase’
73 | points2D_1[idx] = K1_new * camera1.CamFromImg(points2D_1[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:273,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/Core/MatrixBase.h:185:5: note: candidate: ‘template const Eigen::Product<Derived, OtherDerived, 1> Eigen::MatrixBase::operator*(const Eigen::DiagonalBase&) const [with DiagonalDerived = DiagonalDerived; Derived = Eigen::Matrix<double, 2, 2>]’
185 | operator*(const DiagonalBase &diagonal) const;
| ^~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MatrixBase.h:185:5: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:73:74: note: ‘std::optional<Eigen::Matrix<double, 2, 1> >’ is not derived from ‘const Eigen::DiagonalBase’
73 | points2D_1[idx] = K1_new * camera1.CamFromImg(points2D_1[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:50,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/c++/10/complex:391:5: note: candidate: ‘template std::complex<_Tp> std::operator*(const std::complex<_Tp>&, const std::complex<_Tp>&)’
391 | operator*(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/10/complex:391:5: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:73:74: note: ‘Eigen::Matrix2d’ {aka ‘Eigen::Matrix<double, 2, 2>’} is not derived from ‘const std::complex<_Tp>’
73 | points2D_1[idx] = K1_new * camera1.CamFromImg(points2D_1[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:50,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/c++/10/complex:400:5: note: candidate: ‘template std::complex<_Tp> std::operator*(const std::complex<_Tp>&, const _Tp&)’
400 | operator*(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/include/c++/10/complex:400:5: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:73:74: note: ‘Eigen::Matrix2d’ {aka ‘Eigen::Matrix<double, 2, 2>’} is not derived from ‘const std::complex<_Tp>’
73 | points2D_1[idx] = K1_new * camera1.CamFromImg(points2D_1[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:50,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/c++/10/complex:409:5: note: candidate: ‘template std::complex<_Tp> std::operator*(const _Tp&, const std::complex<_Tp>&)’
409 | operator*(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/10/complex:409:5: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:73:74: note: ‘std::optional<Eigen::Matrix<double, 2, 1> >’ is not derived from ‘const std::complex<_Tp>’
73 | points2D_1[idx] = K1_new * camera1.CamFromImg(points2D_1[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:326,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/Core/PermutationMatrix.h:515:1: note: candidate: ‘template<class MatrixDerived, class PermutationDerived> const Eigen::Product<MatrixDerived, PermutationDerived, 2> Eigen::operator*(const Eigen::MatrixBase&, const Eigen::PermutationBase&)’
515 | operator*(const MatrixBase &matrix,
| ^~~~~~~~
/usr/include/eigen3/Eigen/src/Core/PermutationMatrix.h:515:1: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:73:74: note: ‘std::optional<Eigen::Matrix<double, 2, 1> >’ is not derived from ‘const Eigen::PermutationBase’
73 | points2D_1[idx] = K1_new * camera1.CamFromImg(points2D_1[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:326,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/Core/PermutationMatrix.h:527:1: note: candidate: ‘template<class PermutationDerived, class MatrixDerived> const Eigen::Product<MatrixDerived, PermutationDerived, 2> Eigen::operator*(const Eigen::PermutationBase&, const Eigen::MatrixBase&)’
527 | operator*(const PermutationBase &permutation,
| ^~~~~~~~
/usr/include/eigen3/Eigen/src/Core/PermutationMatrix.h:527:1: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:73:74: note: ‘Eigen::Matrix2d’ {aka ‘Eigen::Matrix<double, 2, 2>’} is not derived from ‘const Eigen::PermutationBase’
73 | points2D_1[idx] = K1_new * camera1.CamFromImg(points2D_1[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:327,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/Core/Transpositions.h:313:1: note: candidate: ‘template<class MatrixDerived, class TranspositionsDerived> const Eigen::Product<MatrixDerived, PermutationDerived, 2> Eigen::operator*(const Eigen::MatrixBase&, const Eigen::TranspositionsBase&)’
313 | operator*(const MatrixBase &matrix,
| ^~~~~~~~
/usr/include/eigen3/Eigen/src/Core/Transpositions.h:313:1: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:73:74: note: ‘std::optional<Eigen::Matrix<double, 2, 1> >’ is not derived from ‘const Eigen::TranspositionsBase’
73 | points2D_1[idx] = K1_new * camera1.CamFromImg(points2D_1[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:327,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/Core/Transpositions.h:325:1: note: candidate: ‘template<class TranspositionsDerived, class MatrixDerived> const Eigen::Product<MatrixDerived, PermutationDerived, 2> Eigen::operator*(const Eigen::TranspositionsBase&, const Eigen::MatrixBase&)’
325 | operator*(const TranspositionsBase &transpositions,
| ^~~~~~~~
/usr/include/eigen3/Eigen/src/Core/Transpositions.h:325:1: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:73:74: note: ‘Eigen::Matrix2d’ {aka ‘Eigen::Matrix<double, 2, 2>’} is not derived from ‘const Eigen::TranspositionsBase’
73 | points2D_1[idx] = K1_new * camera1.CamFromImg(points2D_1[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Householder:24,
from /usr/include/eigen3/Eigen/QR:15,
from /usr/include/eigen3/Eigen/SVD:11,
from /usr/include/eigen3/Eigen/Geometry:13,
from /usr/local/include/colmap/scene/camera.h:39,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:5,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/Householder/HouseholderSequence.h:513:99: note: candidate: ‘template<class OtherDerived, class VectorsType, class CoeffsType, int Side> typename Eigen::internal::matrix_type_times_scalar_type<typename VectorsType::Scalar, OtherDerived>::Type Eigen::operator*(const Eigen::MatrixBase&, const Eigen::HouseholderSequence<VectorsType, CoeffsType, Side>&)’
513 | typename internal::matrix_type_times_scalar_type<typename VectorsType::Scalar,OtherDerived>::Type operator*(const MatrixBase& other, const HouseholderSequence<VectorsType,CoeffsType,Side>& h)
| ^~~~~~~~
/usr/include/eigen3/Eigen/src/Householder/HouseholderSequence.h:513:99: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:73:74: note: ‘std::optional<Eigen::Matrix<double, 2, 1> >’ is not derived from ‘const Eigen::HouseholderSequence<VectorsType, CoeffsType, Side>’
73 | points2D_1[idx] = K1_new * camera1.CamFromImg(points2D_1[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Geometry:46,
from /usr/local/include/colmap/scene/camera.h:39,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:5,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/Geometry/Scaling.h:135:1: note: candidate: ‘template<class Derived, class Scalar> Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<typename Eigen::internal::traits::Scalar, Scalar>, const Derived, const typename Eigen::internal::plain_constant_type<Expr, Scalar>::type> Eigen::operator*(const Eigen::MatrixBase&, const Eigen::UniformScaling&)’
135 | operator*(const MatrixBase& matrix, const UniformScaling& s)
| ^~~~~~~~
/usr/include/eigen3/Eigen/src/Geometry/Scaling.h:135:1: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:73:74: note: ‘std::optional<Eigen::Matrix<double, 2, 1> >’ is not derived from ‘const Eigen::UniformScaling’
73 | points2D_1[idx] = K1_new * camera1.CamFromImg(points2D_1[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:19,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: note: candidate: ‘template const Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<typename Eigen::internal::promote_scalar_arg<double, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<T, double, Eigen::internal::scalar_product_op<T, double> > >::value>::type, double>, const typename Eigen::internal::plain_constant_type<Eigen::Matrix<double, 2, 1>, typename Eigen::internal::promote_scalar_arg<double, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<T, double, Eigen::internal::scalar_product_op<T, double> > >::value>::type>::type, const Eigen::Matrix<double, 2, 1> > Eigen::operator*(const T&, const StorageBaseType&)’
50 | EIGEN_MAKE_SCALAR_BINARY_OP(operator*,product)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:73:58: note: cannot convert ‘colmap::Camera::CamFromImg(const Vector2d&) const(((const Vector2d)(& points2D_1.std::vector<Eigen::Matrix<double, 2, 1> >::operator)))’ (type ‘std::optional<Eigen::Matrix<double, 2, 1> >’) to type ‘const StorageBaseType&’ {aka ‘const Eigen::MatrixBase<Eigen::Matrix<double, 2, 1> >&’}
73 | points2D_1[idx] = K1_new * camera1.CamFromImg(points2D_1[idx]);
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:19,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: note: candidate: ‘template const Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<typename Eigen::internal::promote_scalar_arg<double, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<T, double, Eigen::internal::scalar_product_op<T, double> > >::value>::type, double>, const typename Eigen::internal::plain_constant_type<Eigen::Matrix<double, 2, 2>, typename Eigen::internal::promote_scalar_arg<double, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<T, double, Eigen::internal::scalar_product_op<T, double> > >::value>::type>::type, const Eigen::Matrix<double, 2, 2> > Eigen::operator*(const T&, const StorageBaseType&)’
50 | EIGEN_MAKE_SCALAR_BINARY_OP(operator*,product)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:73:58: note: cannot convert ‘colmap::Camera::CamFromImg(const Vector2d&) const(((const Vector2d)(& points2D_1.std::vector<Eigen::Matrix<double, 2, 1> >::operator)))’ (type ‘std::optional<Eigen::Matrix<double, 2, 1> >’) to type ‘const StorageBaseType&’ {aka ‘const Eigen::MatrixBase<Eigen::Matrix<double, 2, 2> >&’}
73 | points2D_1[idx] = K1_new * camera1.CamFromImg(points2D_1[idx]);
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:74:38: error: no match for ‘operator*’ (operand types are ‘Eigen::Matrix2d’ {aka ‘Eigen::Matrix<double, 2, 2>’} and ‘std::optional<Eigen::Matrix<double, 2, 1> >’)
74 | points2D_2[idx] = K2_new * camera2.CamFromImg(points2D_2[idx]);
| ~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | std::optional<Eigen::Matrix<double, 2, 1> >
| Eigen::Matrix2d {aka Eigen::Matrix<double, 2, 2>}
In file included from /usr/include/eigen3/Eigen/Core:19,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: note: candidate: ‘template const Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<typename Eigen::internal::traits::Scalar, typename Eigen::internal::promote_scalar_arg<typename Eigen::internal::traits::Scalar, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<typename Eigen::internal::traits::Scalar, T, Eigen::internal::scalar_product_op<typename Eigen::internal::traits::Scalar, T> > >::value>::type>, const Derived, const typename Eigen::internal::plain_constant_type<Derived, typename Eigen::internal::promote_scalar_arg<typename Eigen::internal::traits::Scalar, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<typename Eigen::internal::traits::Scalar, T, Eigen::internal::scalar_product_op<typename Eigen::internal::traits::Scalar, T> > >::value>::type>::type> Eigen::MatrixBase::operator*(const T&) const [with T = T; Derived = Eigen::Matrix<double, 2, 2>]’
50 | EIGEN_MAKE_SCALAR_BINARY_OP(operator*,product)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: note: template argument deduction/substitution failed:
/usr/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h: In substitution of ‘template const Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double, typename Eigen::internal::promote_scalar_arg<double, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<double, T, Eigen::internal::scalar_product_op<double, T> > >::value>::type>, const Eigen::Matrix<double, 2, 2>, const typename Eigen::internal::plain_constant_type<Eigen::Matrix<double, 2, 2>, typename Eigen::internal::promote_scalar_arg<double, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<double, T, Eigen::internal::scalar_product_op<double, T> > >::value>::type>::type> Eigen::MatrixBase<Eigen::Matrix<double, 2, 2> >::operator*(const T&) const [with T = std::optional<Eigen::Matrix<double, 2, 1> >]’:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:74:74: required from here
/usr/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: error: no type named ‘type’ in ‘struct Eigen::internal::promote_scalar_arg<double, std::optional<Eigen::Matrix<double, 2, 1> >, false>’
In file included from /usr/include/eigen3/Eigen/Core:273,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/Core/MatrixBase.h:166:5: note: candidate: ‘template const Eigen::Product<Derived, OtherDerived> Eigen::MatrixBase::operator*(const Eigen::MatrixBase&) const [with OtherDerived = OtherDerived; Derived = Eigen::Matrix<double, 2, 2>]’
166 | operator*(const MatrixBase &other) const;
| ^~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MatrixBase.h:166:5: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:74:74: note: ‘std::optional<Eigen::Matrix<double, 2, 1> >’ is not derived from ‘const Eigen::MatrixBase’
74 | points2D_2[idx] = K2_new * camera2.CamFromImg(points2D_2[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:273,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/Core/MatrixBase.h:185:5: note: candidate: ‘template const Eigen::Product<Derived, OtherDerived, 1> Eigen::MatrixBase::operator*(const Eigen::DiagonalBase&) const [with DiagonalDerived = DiagonalDerived; Derived = Eigen::Matrix<double, 2, 2>]’
185 | operator*(const DiagonalBase &diagonal) const;
| ^~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MatrixBase.h:185:5: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:74:74: note: ‘std::optional<Eigen::Matrix<double, 2, 1> >’ is not derived from ‘const Eigen::DiagonalBase’
74 | points2D_2[idx] = K2_new * camera2.CamFromImg(points2D_2[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:50,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/c++/10/complex:391:5: note: candidate: ‘template std::complex<_Tp> std::operator*(const std::complex<_Tp>&, const std::complex<_Tp>&)’
391 | operator*(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/10/complex:391:5: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:74:74: note: ‘Eigen::Matrix2d’ {aka ‘Eigen::Matrix<double, 2, 2>’} is not derived from ‘const std::complex<_Tp>’
74 | points2D_2[idx] = K2_new * camera2.CamFromImg(points2D_2[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:50,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/c++/10/complex:400:5: note: candidate: ‘template std::complex<_Tp> std::operator*(const std::complex<_Tp>&, const _Tp&)’
400 | operator*(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/include/c++/10/complex:400:5: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:74:74: note: ‘Eigen::Matrix2d’ {aka ‘Eigen::Matrix<double, 2, 2>’} is not derived from ‘const std::complex<_Tp>’
74 | points2D_2[idx] = K2_new * camera2.CamFromImg(points2D_2[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:50,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/c++/10/complex:409:5: note: candidate: ‘template std::complex<_Tp> std::operator*(const _Tp&, const std::complex<_Tp>&)’
409 | operator*(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/10/complex:409:5: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:74:74: note: ‘std::optional<Eigen::Matrix<double, 2, 1> >’ is not derived from ‘const std::complex<_Tp>’
74 | points2D_2[idx] = K2_new * camera2.CamFromImg(points2D_2[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:326,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/Core/PermutationMatrix.h:515:1: note: candidate: ‘template<class MatrixDerived, class PermutationDerived> const Eigen::Product<MatrixDerived, PermutationDerived, 2> Eigen::operator*(const Eigen::MatrixBase&, const Eigen::PermutationBase&)’
515 | operator*(const MatrixBase &matrix,
| ^~~~~~~~
/usr/include/eigen3/Eigen/src/Core/PermutationMatrix.h:515:1: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:74:74: note: ‘std::optional<Eigen::Matrix<double, 2, 1> >’ is not derived from ‘const Eigen::PermutationBase’
74 | points2D_2[idx] = K2_new * camera2.CamFromImg(points2D_2[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:326,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/Core/PermutationMatrix.h:527:1: note: candidate: ‘template<class PermutationDerived, class MatrixDerived> const Eigen::Product<MatrixDerived, PermutationDerived, 2> Eigen::operator*(const Eigen::PermutationBase&, const Eigen::MatrixBase&)’
527 | operator*(const PermutationBase &permutation,
| ^~~~~~~~
/usr/include/eigen3/Eigen/src/Core/PermutationMatrix.h:527:1: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:74:74: note: ‘Eigen::Matrix2d’ {aka ‘Eigen::Matrix<double, 2, 2>’} is not derived from ‘const Eigen::PermutationBase’
74 | points2D_2[idx] = K2_new * camera2.CamFromImg(points2D_2[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:327,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/Core/Transpositions.h:313:1: note: candidate: ‘template<class MatrixDerived, class TranspositionsDerived> const Eigen::Product<MatrixDerived, PermutationDerived, 2> Eigen::operator*(const Eigen::MatrixBase&, const Eigen::TranspositionsBase&)’
313 | operator*(const MatrixBase &matrix,
| ^~~~~~~~
/usr/include/eigen3/Eigen/src/Core/Transpositions.h:313:1: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:74:74: note: ‘std::optional<Eigen::Matrix<double, 2, 1> >’ is not derived from ‘const Eigen::TranspositionsBase’
74 | points2D_2[idx] = K2_new * camera2.CamFromImg(points2D_2[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:327,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/Core/Transpositions.h:325:1: note: candidate: ‘template<class TranspositionsDerived, class MatrixDerived> const Eigen::Product<MatrixDerived, PermutationDerived, 2> Eigen::operator*(const Eigen::TranspositionsBase&, const Eigen::MatrixBase&)’
325 | operator*(const TranspositionsBase &transpositions,
| ^~~~~~~~
/usr/include/eigen3/Eigen/src/Core/Transpositions.h:325:1: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:74:74: note: ‘Eigen::Matrix2d’ {aka ‘Eigen::Matrix<double, 2, 2>’} is not derived from ‘const Eigen::TranspositionsBase’
74 | points2D_2[idx] = K2_new * camera2.CamFromImg(points2D_2[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Householder:24,
from /usr/include/eigen3/Eigen/QR:15,
from /usr/include/eigen3/Eigen/SVD:11,
from /usr/include/eigen3/Eigen/Geometry:13,
from /usr/local/include/colmap/scene/camera.h:39,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:5,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/Householder/HouseholderSequence.h:513:99: note: candidate: ‘template<class OtherDerived, class VectorsType, class CoeffsType, int Side> typename Eigen::internal::matrix_type_times_scalar_type<typename VectorsType::Scalar, OtherDerived>::Type Eigen::operator*(const Eigen::MatrixBase&, const Eigen::HouseholderSequence<VectorsType, CoeffsType, Side>&)’
513 | typename internal::matrix_type_times_scalar_type<typename VectorsType::Scalar,OtherDerived>::Type operator*(const MatrixBase& other, const HouseholderSequence<VectorsType,CoeffsType,Side>& h)
| ^~~~~~~~
/usr/include/eigen3/Eigen/src/Householder/HouseholderSequence.h:513:99: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:74:74: note: ‘std::optional<Eigen::Matrix<double, 2, 1> >’ is not derived from ‘const Eigen::HouseholderSequence<VectorsType, CoeffsType, Side>’
74 | points2D_2[idx] = K2_new * camera2.CamFromImg(points2D_2[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Geometry:46,
from /usr/local/include/colmap/scene/camera.h:39,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:5,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/Geometry/Scaling.h:135:1: note: candidate: ‘template<class Derived, class Scalar> Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<typename Eigen::internal::traits::Scalar, Scalar>, const Derived, const typename Eigen::internal::plain_constant_type<Expr, Scalar>::type> Eigen::operator*(const Eigen::MatrixBase&, const Eigen::UniformScaling&)’
135 | operator*(const MatrixBase& matrix, const UniformScaling& s)
| ^~~~~~~~
/usr/include/eigen3/Eigen/src/Geometry/Scaling.h:135:1: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:74:74: note: ‘std::optional<Eigen::Matrix<double, 2, 1> >’ is not derived from ‘const Eigen::UniformScaling’
74 | points2D_2[idx] = K2_new * camera2.CamFromImg(points2D_2[idx]);
| ^
In file included from /usr/include/eigen3/Eigen/Core:19,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: note: candidate: ‘template const Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<typename Eigen::internal::promote_scalar_arg<double, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<T, double, Eigen::internal::scalar_product_op<T, double> > >::value>::type, double>, const typename Eigen::internal::plain_constant_type<Eigen::Matrix<double, 2, 1>, typename Eigen::internal::promote_scalar_arg<double, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<T, double, Eigen::internal::scalar_product_op<T, double> > >::value>::type>::type, const Eigen::Matrix<double, 2, 1> > Eigen::operator*(const T&, const StorageBaseType&)’
50 | EIGEN_MAKE_SCALAR_BINARY_OP(operator*,product)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:74:58: note: cannot convert ‘colmap::Camera::CamFromImg(const Vector2d&) const(((const Vector2d)(& points2D_2.std::vector<Eigen::Matrix<double, 2, 1> >::operator)))’ (type ‘std::optional<Eigen::Matrix<double, 2, 1> >’) to type ‘const StorageBaseType&’ {aka ‘const Eigen::MatrixBase<Eigen::Matrix<double, 2, 1> >&’}
74 | points2D_2[idx] = K2_new * camera2.CamFromImg(points2D_2[idx]);
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:19,
from /home/hdsl77/glomap/glomap/../glomap/types.h:10,
from /home/hdsl77/glomap/glomap/../glomap/scene/camera.h:3,
from /home/hdsl77/glomap/glomap/../glomap/scene/types_sfm.h:3,
from /home/hdsl77/glomap/glomap/../glomap/estimators/relpose_estimation.h:3,
from /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:1:
/usr/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: note: candidate: ‘template const Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<typename Eigen::internal::promote_scalar_arg<double, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<T, double, Eigen::internal::scalar_product_op<T, double> > >::value>::type, double>, const typename Eigen::internal::plain_constant_type<Eigen::Matrix<double, 2, 2>, typename Eigen::internal::promote_scalar_arg<double, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<T, double, Eigen::internal::scalar_product_op<T, double> > >::value>::type>::type, const Eigen::Matrix<double, 2, 2> > Eigen::operator*(const T&, const StorageBaseType&)’
50 | EIGEN_MAKE_SCALAR_BINARY_OP(operator*,product)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: note: template argument deduction/substitution failed:
/home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:74:58: note: cannot convert ‘colmap::Camera::CamFromImg(const Vector2d&) const(((const Vector2d)(& points2D_2.std::vector<Eigen::Matrix<double, 2, 1> >::operator)))’ (type ‘std::optional<Eigen::Matrix<double, 2, 1> >’) to type ‘const StorageBaseType&’ {aka ‘const Eigen::MatrixBase<Eigen::Matrix<double, 2, 2> >&’}
74 | points2D_2[idx] = K2_new * camera2.CamFromImg(points2D_2[idx]);
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
[2/31] Building CXX object glomap/CMakeFiles/glomap.dir/controllers/track_retriangulation.cc.o
FAILED: glomap/CMakeFiles/glomap.dir/controllers/track_retriangulation.cc.o
/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_GRAPH_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCERES_EXPORT_INTERNAL_SYMBOLS -DCOLMAP_CGAL_ENABLED -DCOLMAP_CUDA_ENABLED -DCOLMAP_DOWNLOAD_ENABLED -DCOLMAP_GPU_ENABLED -DCOLMAP_GUI_ENABLED -DCOLMAP_LSD_ENABLED -DGFLAGS_IS_A_DLL=0 -DGLOG_VERSION_MAJOR=0 -DGLOG_VERSION_MINOR=4 -DGLOMAP_CUDA_ENABLED -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -DPOSELIB_DEBUG=0 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -I/home/hdsl77/glomap/glomap/.. -isystem /usr/include/eigen3 -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGL -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/local/. -isystem /usr/local/cuda/targets/x86_64-linux/include -isystem /usr/include/suitesparse -O3 -DNDEBUG -std=gnu++17 -fPIC -Wall -Werror -Wno-sign-compare -Wno-unused-variable -fopenmp -MD -MT glomap/CMakeFiles/glomap.dir/controllers/track_retriangulation.cc.o -MF glomap/CMakeFiles/glomap.dir/controllers/track_retriangulation.cc.o.d -o glomap/CMakeFiles/glomap.dir/controllers/track_retriangulation.cc.o -c /home/hdsl77/glomap/glomap/controllers/track_retriangulation.cc
/home/hdsl77/glomap/glomap/controllers/track_retriangulation.cc: In function ‘bool glomap::RetriangulateTracks(const glomap::TriangulatorOptions&, const colmap::Database&, std::unordered_map<unsigned int, glomap::Camera>&, std::unordered_map<unsigned int, glomap::Image>&, std::unordered_map<long unsigned int, glomap::Track>&)’:
/home/hdsl77/glomap/glomap/controllers/track_retriangulation.cc:62:75: error: invalid initialization of reference of type ‘const std::set&’ from expression of type ‘std::vector’
62 | const std::set<image_t>& reg_image_ids = reconstruction_ptr->RegImageIds();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/home/hdsl77/glomap/glomap/controllers/track_retriangulation.cc:82:14: error: ‘struct colmap::BundleAdjustmentOptions’ has no member named ‘refine_extrinsics’; did you mean ‘refine_extra_params’?
82 | ba_options.refine_extrinsics = false;
| ^~~~~~~~~~~~~~~~~
| refine_extra_params
[10/31] Building CXX object glomap/CMakeFiles/glomap.dir/estimators/bundle_adjustment.cc.o
ninja: build stopped: subcommand failed.

the 2 errors that i could get from this log are:

  1. /home/hdsl77/glomap/glomap/estimators/relpose_estimation.cc:73:38: error: no match for ‘operator*’ (operand types are ‘Eigen::Matrix2d’ {aka ‘Eigen::Matrix<double, 2, 2>’} and ‘std::optional<Eigen::Matrix<double, 2, 1> >’)
  2. /home/hdsl77/glomap/glomap/controllers/track_retriangulation.cc:82:14: error: ‘struct colmap::BundleAdjustmentOptions’ has no member named ‘refine_extrinsics’; did you mean ‘refine_extra_params’?

can someone help me fix this? been stuck for some time now.

Activity

  1. bszollosinagy commented on Jul 20, 2025

    @bszollosinagy

    Hi,
    I had the same problem.

    Root cause: Turns out the source of the issue is that I followed the Build from source guideline for COLMAP too closely. There it simply says to clone the COLMAP repo, and build. This is the problem. This will give you the live development version, and in that version the refine_extrinsics is replaced by other things. In fact it is removed from version 3.12.0 onwards. See this commit

    Solution: when building COLMAP, do a git checkout 3.11.1 before building to get a release version. Or just download the source zip. You might need to install libflann-dev too.

    Note: if like me you already installed the latest dev version of COLMAP using sudo ninja install, you can uninstall with sudo ninja uninstall before checking out the release tag, rebuilding and re-installing.

  2. jwd222 commented on Jul 30, 2025

    @jwd222
    Author

    Thanks for the suggestions. I'll try it and see if it works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions