-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to the COLMAP head. Use FetchContent for PoseLib and COLMAP (#98
) * init migration. * formatting. * update. * seems to be working * skip copying to source * fix. remove poselib include * fix non void * switch to official libigl * use fetch content for poselib. update readme. * fetch content for colmap * update readme. no need for colmap installation * update cmakelist * fix install * update readme * update * fix submodule * try to disable cuda for colmap * fix binding * move CUDA_ENABLED to top level * fix copy in pybind * switch to clang-format 19.1.0 and use pip * upgrade deeplsd * use logging from pycolmap * disable parallelization in fitnmerge * fix formatting * fix formatting * E501 * fix scripts * remove python json logger * fix copy constructor for other classes * Update to latest DeepLSD --------- Co-authored-by: pautratrmi <[email protected]>
- Loading branch information
Showing
93 changed files
with
734 additions
and
582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
################################################################################ | ||
# Find packages | ||
################################################################################ | ||
find_package(Eigen3 3.4 REQUIRED) | ||
find_package(FreeImage REQUIRED) | ||
find_package(Glog REQUIRED) | ||
if(DEFINED glog_VERSION_MAJOR) | ||
# Older versions of glog don't export version variables. | ||
add_definitions("-DGLOG_VERSION_MAJOR=${glog_VERSION_MAJOR}") | ||
add_definitions("-DGLOG_VERSION_MINOR=${glog_VERSION_MINOR}") | ||
endif() | ||
find_package(Boost REQUIRED COMPONENTS | ||
graph | ||
program_options | ||
system) | ||
|
||
# Ceres | ||
find_package(Ceres REQUIRED COMPONENTS SuiteSparse) | ||
if(${CERES_VERSION} VERSION_LESS "2.2.0") | ||
# ceres 2.2.0 changes the interface of local parameterization | ||
add_definitions("-DCERES_PARAMETERIZATION_ENABLED") | ||
endif() | ||
if(INTERPOLATION_ENABLED) | ||
message(STATUS "Enabling pixelwise optimization with ceres interpolation. This should be disabled for clang.") | ||
add_definitions("-DINTERPOLATION_ENABLED") | ||
else() | ||
message(STATUS "Disabling pixelwise optimization with ceres interpolation.") | ||
endif() | ||
|
||
# OpenMP | ||
if(OPENMP_ENABLED) | ||
find_package(OpenMP) | ||
if(OPENMP_FOUND) | ||
message(STATUS "Enabling OpenMP support") | ||
add_definitions("-DOPENMP_ENABLED") | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") | ||
endif() | ||
endif() | ||
|
||
# PoseLib | ||
include(FetchContent) | ||
FetchContent_Declare(PoseLib | ||
GIT_REPOSITORY https://github.com/PoseLib/PoseLib.git | ||
GIT_TAG a84c545a9895e46d12a3f5ccde2581c25e6a6953 | ||
EXCLUDE_FROM_ALL | ||
) | ||
message(STATUS "Configuring PoseLib...") | ||
if (FETCH_POSELIB) | ||
FetchContent_MakeAvailable(PoseLib) | ||
else() | ||
find_package(PoseLib REQUIRED) | ||
endif() | ||
message(STATUS "Configuring PoseLib... done") | ||
|
||
# COLMAP | ||
FetchContent_Declare(COLMAP | ||
GIT_REPOSITORY https://github.com/colmap/colmap.git | ||
GIT_TAG 63b2cc000de32dc697f45ef1576dec7e67abddbc | ||
EXCLUDE_FROM_ALL | ||
) | ||
message(STATUS "Configuring COLMAP...") | ||
if (FETCH_COLMAP) | ||
FetchContent_MakeAvailable(COLMAP) | ||
else() | ||
find_package(COLMAP REQUIRED) | ||
endif() | ||
message(STATUS "Configuring COLMAP... done") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# 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. | ||
|
||
|
||
# Find package module for FreeImage library. | ||
# | ||
# The following variables are set by this module: | ||
# | ||
# FREEIMAGE_FOUND: TRUE if FreeImage is found. | ||
# freeimage::FreeImage_limap: Imported target to link against. | ||
# | ||
# The following variables control the behavior of this module: | ||
# | ||
# FREEIMAGE_INCLUDE_DIR_HINTS: List of additional directories in which to | ||
# search for FreeImage includes. | ||
# FREEIMAGE_LIBRARY_DIR_HINTS: List of additional directories in which to | ||
# search for FreeImage libraries. | ||
|
||
set(FREEIMAGE_INCLUDE_DIR_HINTS "" CACHE PATH "FreeImage include directory") | ||
set(FREEIMAGE_LIBRARY_DIR_HINTS "" CACHE PATH "FreeImage library directory") | ||
|
||
unset(FREEIMAGE_FOUND) | ||
|
||
find_package(FreeImage CONFIG QUIET) | ||
if(FreeImage_FOUND) | ||
if(TARGET freeimage::FreeImage_limap) | ||
set(FREEIMAGE_FOUND TRUE) | ||
message(STATUS "Found FreeImage") | ||
message(STATUS " Target : freeimage::FreeImage_limap") | ||
endif() | ||
else() | ||
list(APPEND FREEIMAGE_CHECK_INCLUDE_DIRS | ||
${FREEIMAGE_INCLUDE_DIR_HINTS} | ||
/usr/include | ||
/usr/local/include | ||
/opt/include | ||
/opt/local/include | ||
) | ||
|
||
list(APPEND FREEIMAGE_CHECK_LIBRARY_DIRS | ||
${FREEIMAGE_LIBRARY_DIR_HINTS} | ||
/usr/lib | ||
/usr/local/lib | ||
/opt/lib | ||
/opt/local/lib | ||
) | ||
|
||
find_path(FREEIMAGE_INCLUDE_DIRS | ||
NAMES | ||
FreeImage.h | ||
PATHS | ||
${FREEIMAGE_CHECK_INCLUDE_DIRS}) | ||
find_library(FREEIMAGE_LIBRARIES | ||
NAMES | ||
freeimage | ||
PATHS | ||
${FREEIMAGE_CHECK_LIBRARY_DIRS}) | ||
|
||
if(FREEIMAGE_INCLUDE_DIRS AND FREEIMAGE_LIBRARIES) | ||
set(FREEIMAGE_FOUND TRUE) | ||
endif() | ||
|
||
if(FREEIMAGE_FOUND) | ||
message(STATUS "Found FreeImage") | ||
message(STATUS " Includes : ${FREEIMAGE_INCLUDE_DIRS}") | ||
message(STATUS " Libraries : ${FREEIMAGE_LIBRARIES}") | ||
endif() | ||
|
||
add_library(freeimage::FreeImage_limap INTERFACE IMPORTED) | ||
target_include_directories( | ||
freeimage::FreeImage_limap INTERFACE ${FREEIMAGE_INCLUDE_DIRS}) | ||
target_link_libraries( | ||
freeimage::FreeImage_limap INTERFACE ${FREEIMAGE_LIBRARIES}) | ||
endif() | ||
|
||
if(NOT FREEIMAGE_FOUND AND FREEIMAGE_FIND_REQUIRED) | ||
message(FATAL_ERROR "Could not find FreeImage") | ||
endif() |
Oops, something went wrong.