[openmvs, vcglib] Update openmvs 2.0.1, vcglib 2022.02 (#25135)

* update version

* Update vcpkg.json

* fix

* fix

* fix some

* x-add-version

* license info

* x-add-version

* Update vcpkg.json

* Update openmvs.json
This commit is contained in:
Long Huan 2022-06-16 02:43:38 +08:00 committed by GitHub
parent 86ff75c6d8
commit a175d0a7d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 163 additions and 576 deletions

View File

@ -1,19 +0,0 @@
libs/Common/Common.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libs/Common/Common.cpp b/libs/Common/Common.cpp
index 052951d..8dc404e 100644
--- a/libs/Common/Common.cpp
+++ b/libs/Common/Common.cpp
@@ -31,6 +31,11 @@ namespace boost {
ASSERT("boost exception thrown" == NULL);
exit(EXIT_FAILURE);
}
+ void throw_exception(std::exception const & e, boost::source_location const &) {
+ VERBOSE("exception thrown: %s", e.what());
+ ASSERT("boost exception thrown" == NULL);
+ exit(EXIT_FAILURE);
+ }
} // namespace boost
#endif
#endif

View File

@ -1,170 +1,24 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7966ed5..f34b5b4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,9 +63,10 @@ INCLUDE_DIRECTORIES("${OpenMVS_SOURCE_DIR}")
SET(OpenMVS_EXTRA_LIBS "")
if(OpenMVS_USE_OPENMP)
SET(OpenMP_LIBS "")
- FIND_PACKAGE(OpenMP)
- if(OPENMP_FOUND)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+ FIND_PACKAGE(OpenMP REQUIRED)
+ if(OpenMP_FOUND)
+ link_libraries(OpenMP::OpenMP_CXX)
+ link_libraries(OpenMP::OpenMP_C)
ADD_DEFINITIONS(-D_USE_OPENMP)
SET(_USE_OPENMP TRUE)
#cmake only check for separate OpenMP library on AppleClang 7+
@@ -83,7 +84,7 @@ if(OpenMVS_USE_OPENGL)
if(POLICY CMP0072)
cmake_policy(SET CMP0072 NEW)
endif()
- FIND_PACKAGE(OpenGL)
+ FIND_PACKAGE(OpenGL REQUIRED)
if(OPENGL_FOUND)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
ADD_DEFINITIONS(${OpenGL_DEFINITIONS} -D_USE_OPENGL)
@@ -94,7 +95,7 @@ if(OpenMVS_USE_OPENGL)
endif()
diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
index 2365de65f..4d871850d 100644
--- a/apps/CMakeLists.txt
+++ b/apps/CMakeLists.txt
@@ -1,6 +1,7 @@
# Add applications
ADD_SUBDIRECTORY(InterfaceCOLMAP)
ADD_SUBDIRECTORY(InterfaceMetashape)
+ADD_SUBDIRECTORY(InterfaceVisualSFM)
ADD_SUBDIRECTORY(DensifyPointCloud)
ADD_SUBDIRECTORY(ReconstructMesh)
ADD_SUBDIRECTORY(RefineMesh)
diff --git a/build/Templates/OpenMVSConfig.cmake.in b/build/Templates/OpenMVSConfig.cmake.in
index 9747b3e1..5e2469d3 100644
--- a/build/Templates/OpenMVSConfig.cmake.in
+++ b/build/Templates/OpenMVSConfig.cmake.in
@@ -15,9 +15,67 @@ set(OpenMVS_INCLUDE_DIRS "@INSTALL_INCLUDE_DIR_IN@")
if(OpenMVS_USE_CUDA)
- FIND_PACKAGE(CUDA)
+ FIND_PACKAGE(CUDA REQUIRED)
if(CUDA_FOUND)
INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS})
ADD_DEFINITIONS(-D_USE_CUDA)
@@ -108,7 +109,7 @@ else()
endif()
set(OpenMVS_DEFINITIONS "@OpenMVS_DEFINITIONS@")
if(OpenMVS_USE_BREAKPAD)
- FIND_PACKAGE(BREAKPAD)
+ FIND_PACKAGE(BREAKPAD REQUIRED)
if(BREAKPAD_FOUND)
INCLUDE_DIRECTORIES(${BREAKPAD_INCLUDE_DIRS})
ADD_DEFINITIONS(${BREAKPAD_DEFINITIONS} -D_USE_BREAKPAD)
@@ -119,7 +120,7 @@ if(OpenMVS_USE_BREAKPAD)
endif()
endif()
-FIND_PACKAGE(Boost ${SYSTEM_PACKAGE_REQUIRED} COMPONENTS iostreams program_options system serialization)
+FIND_PACKAGE(Boost COMPONENTS iostreams program_options system serialization REQUIRED)
if(Boost_FOUND)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
ADD_DEFINITIONS(${Boost_DEFINITIONS} -D_USE_BOOST)
@@ -127,14 +128,14 @@ if(Boost_FOUND)
SET(_USE_BOOST TRUE)
endif()
-FIND_PACKAGE(Eigen ${SYSTEM_PACKAGE_REQUIRED})
-if(EIGEN_FOUND)
- INCLUDE_DIRECTORIES(${EIGEN_INCLUDE_DIRS})
- ADD_DEFINITIONS(${EIGEN_DEFINITIONS} -D_USE_EIGEN)
+FIND_PACKAGE(Eigen3 REQUIRED)
+if(EIGEN3_FOUND)
+ INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIRS})
+ ADD_DEFINITIONS(${EIGEN3_DEFINITIONS} -D_USE_EIGEN)
SET(_USE_EIGEN TRUE)
endif()
-FIND_PACKAGE(OpenCV ${SYSTEM_PACKAGE_REQUIRED})
+FIND_PACKAGE(OpenCV REQUIRED)
if(OpenCV_FOUND)
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
ADD_DEFINITIONS(${OpenCV_DEFINITIONS})
@@ -170,7 +171,9 @@ ADD_DEFINITIONS(${OpenMVS_DEFINITIONS})
# Add modules
ADD_SUBDIRECTORY(libs)
+if(OpenMVS_BUILD_TOOLS)
ADD_SUBDIRECTORY(apps)
+endif()
ADD_SUBDIRECTORY(docs)
if(OpenMVS_USE_CERES)
@@ -188,7 +191,7 @@ export(TARGETS Common IO Math MVS FILE "${PROJECT_BINARY_DIR}/OpenMVSTargets.cma
# Export the package for use from the build-tree
# (this registers the build-tree with a global CMake-registry)
export(PACKAGE OpenMVS)
-
+
# Create the OpenMVSConfig.cmake and OpenMVSConfigVersion files
file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" "${INSTALL_INCLUDE_DIR}")
# ... for the build tree
@@ -199,7 +202,7 @@ set(CONF_INCLUDE_DIRS "${INSTALL_CMAKE_DIR}/${REL_INCLUDE_DIR}")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/build/OpenMVSConfig.cmake.in" "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/OpenMVSConfig.cmake" @ONLY)
# ... for both
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/build/OpenMVSConfigVersion.cmake.in" "${PROJECT_BINARY_DIR}/OpenMVSConfigVersion.cmake" @ONLY)
-
+
# Install the OpenMVSConfig.cmake and OpenMVSConfigVersion.cmake
install(FILES
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/OpenMVSConfig.cmake"
diff --git a/MvgMvsPipeline.py b/MvgMvsPipeline.py.in
similarity index 97%
rename from MvgMvsPipeline.py
rename to MvgMvsPipeline.py.in
index f4914bf..23d03e6 100644
--- a/MvgMvsPipeline.py
+++ b/MvgMvsPipeline.py.in
@@ -175,10 +175,10 @@ class StepsStore:
["-i", "%input_dir%", "-o", "%matches_dir%", "-d", "%camera_file_params%"]],
["Compute features", # 1
os.path.join(OPENMVG_BIN, "openMVG_main_ComputeFeatures"),
- ["-i", "%matches_dir%/sfm_data.json", "-o", "%matches_dir%", "-m", "SIFT", "-n", "4"]],
+ ["-i", "%matches_dir%/sfm_data.json", "-o", "%matches_dir%", "-m", "SIFT"]],
["Compute matches", # 2
os.path.join(OPENMVG_BIN, "openMVG_main_ComputeMatches"),
- ["-i", "%matches_dir%/sfm_data.json", "-o", "%matches_dir%", "-n", "HNSWL2", "-r", ".8"]],
+ ["-i", "%matches_dir%/sfm_data.json", "-o", "%matches_dir%", "-n", "AUTO", "-r", ".8"]],
["Incremental reconstruction", # 3
os.path.join(OPENMVG_BIN, "openMVG_main_IncrementalSfM"),
["-i", "%matches_dir%/sfm_data.json", "-m", "%matches_dir%", "-o", "%reconstruction_dir%"]],
diff --git a/apps/Viewer/CMakeLists.txt b/apps/Viewer/CMakeLists.txt
index c519040..934cd50 100644
--- a/apps/Viewer/CMakeLists.txt
+++ b/apps/Viewer/CMakeLists.txt
@@ -16,18 +16,6 @@ else()
MESSAGE("-- Can't find GLEW. Continuing without it.")
RETURN()
endif()
-if(CMAKE_COMPILER_IS_GNUCXX)
- FIND_PACKAGE(PkgConfig QUIET)
- pkg_search_module(GLFW QUIET glfw3)
- if(GLFW_FOUND)
- INCLUDE_DIRECTORIES(${GLFW_INCLUDE_DIRS})
- ADD_DEFINITIONS(${GLFW_DEFINITIONS})
- MESSAGE(STATUS "GLFW3 ${GLFW_VERSION} found (include: ${GLFW_INCLUDE_DIRS})")
- else()
- MESSAGE("-- Can't find GLFW3. Continuing without it.")
- RETURN()
- endif()
-else()
FIND_PACKAGE(glfw3 QUIET)
if(glfw3_FOUND)
INCLUDE_DIRECTORIES(${glfw3_INCLUDE_DIRS})
@@ -37,7 +25,6 @@ else()
MESSAGE("-- Can't find GLFW3. Continuing without it.")
RETURN()
endif()
-endif()
# List sources files
FILE(GLOB PCH_C "Common.cpp")
diff --git a/build/OpenMVSConfig.cmake.in b/build/OpenMVSConfig.cmake.in
index 96b8fe2..fa6d4a6 100644
--- a/build/OpenMVSConfig.cmake.in
+++ b/build/OpenMVSConfig.cmake.in
@@ -3,16 +3,71 @@
# OpenMVS_INCLUDE_DIRS - include directories for OpenMVS
# OpenMVS_LIBRARIES - libraries to link against
# OpenMVS_BINARIES - the binaries
-
+
# Compute paths
get_filename_component(OpenMVS_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(OpenMVS_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@")
-
+list(APPEND CMAKE_MODULE_PATH "${OpenMVS_CMAKE_DIR}")
+
+if (MSVC)
@ -221,36 +75,33 @@ index 96b8fe2..fa6d4a6 100644
+
+add_definitions(@OpenMVS_DEFINITIONS@)
+
# Our library dependencies (contains definitions for IMPORTED targets)
if(NOT TARGET MVS AND NOT OpenMVS_BINARY_DIR)
include("${OpenMVS_CMAKE_DIR}/OpenMVSTargets.cmake")
endif()
-
+# Our library dependencies (contains definitions for IMPORTED targets)
+if(NOT TARGET MVS AND NOT OpenMVS_BINARY_DIR)
+ include("${OpenMVS_CMAKE_DIR}/OpenMVSTargets.cmake")
+endif()
+
# These are IMPORTED targets created by OpenMVSTargets.cmake
set(OpenMVS_LIBRARIES MVS)
set(OpenMVS_BINARIES InterfaceVisualSFM DensifyPointCloud ReconstructMesh RefineMesh TextureMesh)
-set(OpenMVS_BINARIES InterfaceCOLMAP DensifyPointCloud ReconstructMesh RefineMesh TextureMesh)
-
-include("${CMAKE_CURRENT_LIST_DIR}/OpenMVSTargets.cmake")
-check_required_components("OpenMVS")
+set(OpenMVS_BINARIES InterfaceVisualSFM InterfaceCOLMAP DensifyPointCloud ReconstructMesh RefineMesh TextureMesh)
diff --git a/build/Utils.cmake b/build/Utils.cmake
index f41c9d8..31cd292 100644
index 106d43167..33390d192 100644
--- a/build/Utils.cmake
+++ b/build/Utils.cmake
@@ -160,7 +160,7 @@ macro(GetOperatingSystemArchitectureBitness)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES i686.*|i386.*|x86.*)
set(X86 1)
endif()
-
+
if(NOT ${MY_VAR_PREFIX}_PACKAGE_REQUIRED)
set(${MY_VAR_PREFIX}_PACKAGE_REQUIRED "REQUIRED")
endif()
@@ -173,30 +173,6 @@ macro(ComposePackageLibSuffix)
@@ -173,32 +173,6 @@ macro(ComposePackageLibSuffix)
set(PACKAGE_LIB_SUFFIX "")
set(PACKAGE_LIB_SUFFIX_DBG "")
set(PACKAGE_LIB_SUFFIX_REL "")
- if(MSVC)
- if("${MSVC_VERSION}" STREQUAL "1921")
- if("${MSVC_VERSION}" STRGREATER "1929")
- set(PACKAGE_LIB_SUFFIX "/vc17")
- elseif("${MSVC_VERSION}" STRGREATER "1916")
- set(PACKAGE_LIB_SUFFIX "/vc16")
- elseif("${MSVC_VERSION}" STREQUAL "1916")
- elseif("${MSVC_VERSION}" STRGREATER "1900")
- set(PACKAGE_LIB_SUFFIX "/vc15")
- elseif("${MSVC_VERSION}" STREQUAL "1900")
- set(PACKAGE_LIB_SUFFIX "/vc14")
@ -274,58 +125,31 @@ index f41c9d8..31cd292 100644
endmacro()
@@ -511,7 +487,7 @@ macro(optimize_default_compiler_settings)
endif()
add_extra_compiler_option(-fdiagnostics-show-option)
add_extra_compiler_option(-ftemplate-backtrace-limit=0)
-
+
# The -Wno-long-long is required in 64bit systems when including sytem headers.
if(X86_64)
add_extra_compiler_option(-Wno-long-long)
@@ -817,7 +793,7 @@ macro(ConfigCompilerAndLinker)
else()
set(cxx_rtti_support "${cxx_no_rtti_flags}")
endif()
-
+
SET(cxx_default "${cxx_exception_support} ${cxx_rtti_support}" CACHE PATH "Common compile CXX flags")
SET(c_default "${CMAKE_C_FLAGS} ${cxx_base_flags}" CACHE PATH "Common compile C flags")
endmacro()
@@ -825,16 +801,12 @@ endmacro()
# Initialize variables needed for a library type project.
macro(ConfigLibrary)
@@ -806,12 +780,8 @@ macro(ConfigLibrary)
# Offer the user the choice of overriding the installation directories
- set(INSTALL_LIB_DIR "lib/${PROJECT_NAME}" CACHE PATH "Installation directory for libraries")
- set(INSTALL_BIN_DIR "bin/${PROJECT_NAME}" CACHE PATH "Installation directory for executables")
- set(INSTALL_INCLUDE_DIR "include/${PROJECT_NAME}" CACHE PATH "Installation directory for header files")
set(INSTALL_LIB_DIR "lib" CACHE PATH "Installation directory for libraries")
set(INSTALL_BIN_DIR "bin" CACHE PATH "Installation directory for executables")
- set(INSTALL_INCLUDE_DIR "include" CACHE PATH "Installation directory for header files")
- if(WIN32 AND NOT CYGWIN)
- set(DEF_INSTALL_CMAKE_DIR "CMake")
- else()
- set(DEF_INSTALL_CMAKE_DIR "lib/CMake/${PROJECT_NAME}")
- set(DEF_INSTALL_CMAKE_DIR "lib/cmake")
- endif()
+ set(INSTALL_LIB_DIR "lib" CACHE PATH "Installation directory for libraries")
+ set(INSTALL_BIN_DIR "bin" CACHE PATH "Installation directory for executables")
+ set(INSTALL_INCLUDE_DIR "include/openmvs" CACHE PATH "Installation directory for header files")
+ set(DEF_INSTALL_CMAKE_DIR "share/openmvs")
set(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Installation directory for CMake files")
-
+
# Make relative paths absolute (needed later on)
foreach(p LIB BIN INCLUDE CMAKE)
set(var INSTALL_${p}_DIR)
diff --git a/libs/Common/CMakeLists.txt b/libs/Common/CMakeLists.txt
index 2e6c1a4..6e1fa95 100644
--- a/libs/Common/CMakeLists.txt
+++ b/libs/Common/CMakeLists.txt
@@ -18,6 +18,7 @@ set_target_pch(Common Common.h)
@@ -822,7 +792,7 @@ macro(ConfigLibrary)
else()
set(${varp} "${CMAKE_INSTALL_PREFIX}/${${var}}")
endif()
- set(${var} "${${varp}}/${PROJECT_NAME}")
+ set(${var} "${${varp}}")
endforeach()
endmacro()
# Link its dependencies
TARGET_LINK_LIBRARIES(Common ${Boost_LIBRARIES} ${OpenCV_LIBS})
+TARGET_INCLUDE_DIRECTORIES(Common PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}> $<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}>)
# Install
SET_TARGET_PROPERTIES(Common PROPERTIES
diff --git a/libs/Common/Strings.h b/libs/Common/MVSStrings.h
similarity index 100%
rename from libs/Common/Strings.h
@ -334,7 +158,7 @@ diff --git a/libs/Common/Types.h b/libs/Common/Types.h
index bcac65c..9abeefb 100644
--- a/libs/Common/Types.h
+++ b/libs/Common/Types.h
@@ -378,7 +378,7 @@ typedef TAliasCast<double,int32_t> CastD2I;
@@ -380,7 +380,7 @@ typedef TAliasCast<double,int32_t> CastD2I;
// I N C L U D E S /////////////////////////////////////////////////
@ -343,90 +167,17 @@ index bcac65c..9abeefb 100644
#include "AutoPtr.h"
#include "List.h"
#include "Thread.h"
@@ -2558,7 +2558,7 @@ public:
/// creates an SO3 as a rotation that takes Vector a into the direction of Vector b
/// with the rotation axis along a ^ b. If |a ^ b| == 0, it creates the identity rotation.
- /// An assertion will fail if Vector a and Vector b are in exactly opposite directions.
+ /// An assertion will fail if Vector a and Vector b are in exactly opposite directions.
/// @param a source Vector
/// @param b target Vector
SO3(const Vec3& a, const Vec3& b) {
@@ -2604,7 +2604,7 @@ public:
mat.row(2) -= mat.row(1) * d12;
mat.row(2).normalize();
// check for positive determinant <=> right handed coordinate system of row vectors
- ASSERT(mat.row(0).cross(mat.row(1)).dot(mat.row(2)) > 0);
+ ASSERT(mat.row(0).cross(mat.row(1)).dot(mat.row(2)) > 0);
}
/// Exponentiate a vector in the Lie algebra to generate a new SO3.
diff --git a/libs/IO/CMakeLists.txt b/libs/IO/CMakeLists.txt
index a354376..4fd478c 100644
--- a/libs/IO/CMakeLists.txt
+++ b/libs/IO/CMakeLists.txt
@@ -43,7 +43,8 @@ cxx_library_with_type_no_pch(IO "Libs" "STATIC" "${cxx_default}"
set_target_pch(IO Common.h)
# Link its dependencies
-TARGET_LINK_LIBRARIES(IO Common ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${EXIV2_LIBS})
+TARGET_LINK_LIBRARIES(IO Common ${TIFF_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${EXIV2_LIBS})
+TARGET_INCLUDE_DIRECTORIES(IO PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}> $<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}>)
# Install
SET_TARGET_PROPERTIES(IO PROPERTIES
diff --git a/libs/MVS/CMakeLists.txt b/libs/MVS/CMakeLists.txt
index 14be620..867cfd5 100644
--- a/libs/MVS/CMakeLists.txt
+++ b/libs/MVS/CMakeLists.txt
@@ -1,12 +1,12 @@
# Find required packages
-FIND_PACKAGE(CGAL ${SYSTEM_PACKAGE_REQUIRED})
+FIND_PACKAGE(CGAL REQUIRED)
if(CGAL_FOUND)
include_directories(${CGAL_INCLUDE_DIRS})
add_definitions(${CGAL_DEFINITIONS})
link_directories(${CGAL_LIBRARY_DIRS})
endif()
-FIND_PACKAGE(VCG ${SYSTEM_PACKAGE_REQUIRED})
+FIND_PACKAGE(VCG REQUIRED)
if(VCG_FOUND)
include_directories(${VCG_INCLUDE_DIRS})
add_definitions(${VCG_DEFINITIONS})
@@ -14,12 +14,10 @@ endif()
set(CERES_LIBS "")
if(OpenMVS_USE_CERES)
- FIND_PACKAGE(CERES)
+ FIND_PACKAGE(Ceres REQUIRED)
if(CERES_FOUND)
include_directories(${CERES_INCLUDE_DIRS})
add_definitions(${CERES_DEFINITIONS})
- else()
- set(OpenMVS_USE_CERES OFF)
endif()
endif()
@@ -42,7 +40,8 @@ cxx_library_with_type_no_pch(MVS "Libs" "" "${cxx_default}"
set_target_pch(MVS Common.h)
# Link its dependencies
-TARGET_LINK_LIBRARIES(MVS PRIVATE Common Math IO ${CERES_LIBS} ${CGAL_LIBS} ${CUDA_CUDA_LIBRARY})
+TARGET_LINK_LIBRARIES(MVS PRIVATE Common Math IO ${CERES_LIBS} CGAL::CGAL ${CUDA_CUDA_LIBRARY})
+TARGET_INCLUDE_DIRECTORIES(MVS PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}> $<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}>)
# Install
SET_TARGET_PROPERTIES(MVS PROPERTIES
diff --git a/libs/Math/CMakeLists.txt b/libs/Math/CMakeLists.txt
index d592bd0..f1fe4c6 100644
--- a/libs/Math/CMakeLists.txt
+++ b/libs/Math/CMakeLists.txt
@@ -35,6 +35,7 @@ set_target_pch(Math Common.h)
# Link its dependencies
TARGET_LINK_LIBRARIES(Math Common)
+TARGET_INCLUDE_DIRECTORIES(Math PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}> $<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}>)
# Install
INSTALL(FILES ${LIBRARY_FILES_H} DESTINATION "${INSTALL_INCLUDE_DIR}/Math" COMPONENT dev)
diff --git a/apps/InterfaceMetashape/InterfaceMetashape.cpp b/apps/InterfaceMetashape/InterfaceMetashape.cpp
index 1157bf29..73563b3c 100644
--- a/apps/InterfaceMetashape/InterfaceMetashape.cpp
+++ b/apps/InterfaceMetashape/InterfaceMetashape.cpp
@@ -246,7 +246,7 @@ bool ParseImageListXML(Scene& scene, PlatformDistCoeffs& pltDistCoeffs, size_t&
tinyxml2::XMLElement* elem;
const size_t nLen(pStream->getSize());
String strCameras; strCameras.resize(nLen);
- pStream->read(&strCameras[0], nLen);
+ pStream->read(strCameras.data(), nLen);
tinyxml2::XMLDocument doc;
doc.Parse(strCameras.c_str(), nLen);
if (doc.ErrorID() != tinyxml2::XML_SUCCESS)

View File

@ -1,8 +1,8 @@
diff --git a/MvgMvsPipeline.py.in b/MvgMvsPipeline.py.in
index 04433f4..e1beaf6 100644
--- a/MvgMvsPipeline.py.in
diff --git a/MvgMvsPipeline.py b/MvgMvsPipeline.py.in
index 53a4a5cc..97735396 100644
--- a/MvgMvsPipeline.py
+++ b/MvgMvsPipeline.py.in
@@ -95,14 +95,14 @@ def find(afile):
@@ -109,14 +109,14 @@ def find(afile):
return d
return None
@ -22,3 +22,21 @@ index 04433f4..e1beaf6 100644
# Ask user for openMVG and openMVS directories if not found
if not OPENMVG_BIN:
diff --git a/MvgOptimizeSfM.py b/MvgOptimizeSfM.py.in
index 930d6805..6eb672c1 100644
--- a/MvgOptimizeSfM.py
+++ b/MvgOptimizeSfM.py.in
@@ -56,9 +56,10 @@ def launch(cmdline):
sys.exit('\r\nProcess canceled by user, all files remains')
+current_dir = os.path.dirname(os.path.abspath(__file__))
# Try to find openMVG and openMVS binaries in PATH
-OPENMVG_BIN = whereis("openMVG_main_SfMInit_ImageListing")
-OPENMVS_BIN = whereis("ReconstructMesh")
+OPENMVG_BIN = os.path.join(current_dir, '..', 'openmvg')
+OPENMVS_BIN = current_dir
# Ask user for openMVG and openMVS directories if not found
if not OPENMVG_BIN:

View File

@ -3,12 +3,11 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO cdcseacave/openMVS
REF v1.1.1
SHA512 eeb15d0756f12136a1e7938a0eed97024d564eef3355f3bb6abf6c681e38919011e1a133d89ca360f463e7fed5feb8e0138a0fe9be4c25b6a13ba4b042aef3eb
REF v2.0.1
SHA512 f1c1708d6e5c9424b95fb71c88ca510c70a4b11711079f12f173ecf190b009a977f7aa11f49a0b2e634a307f2732e4c33d9cd37d727ba60da99051876adb7d1e
HEAD_REF master
PATCHES
fix-build.patch
fix-build-boost-1_77_0.patch
no-absolute-paths.patch
)
@ -16,6 +15,8 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
cuda OpenMVS_USE_CUDA
openmp OpenMVS_USE_OPENMP
nonfree OpenMVS_USE_NONFREE
ceres OpenMVS_USE_CERES
)
file(REMOVE "${SOURCE_PATH}/build/Modules/FindCERES.cmake")
@ -25,8 +26,6 @@ file(REMOVE "${SOURCE_PATH}/build/Modules/FindEIGEN.cmake")
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS ${FEATURE_OPTIONS}
-DOpenMVS_USE_NONFREE=ON
-DOpenMVS_USE_CERES=OFF
-DOpenMVS_USE_FAST_FLOAT2INT=ON
-DOpenMVS_USE_FAST_INVSQRT=OFF
-DOpenMVS_USE_FAST_CBRT=ON
@ -43,20 +42,22 @@ vcpkg_cmake_install()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
vcpkg_fixup_cmake_targets()
file(READ ${CURRENT_PACKAGES_DIR}/share/openmvs/OpenMVSTargets-release.cmake TARGETS_CMAKE)
string(REPLACE "bin/InterfaceCOLMAP" "tools/openmvs/InterfaceCOLMAP" TARGETS_CMAKE "${TARGETS_CMAKE}")
string(REPLACE "bin/InterfaceVisualSFM" "tools/openmvs/InterfaceVisualSFM" TARGETS_CMAKE "${TARGETS_CMAKE}")
string(REPLACE "bin/DensifyPointCloud" "tools/openmvs/DensifyPointCloud" TARGETS_CMAKE "${TARGETS_CMAKE}")
string(REPLACE "bin/ReconstructMesh" "tools/openmvs/ReconstructMesh" TARGETS_CMAKE "${TARGETS_CMAKE}")
string(REPLACE "bin/RefineMesh" "tools/openmvs/RefineMesh" TARGETS_CMAKE "${TARGETS_CMAKE}")
string(REPLACE "bin/TextureMesh" "tools/openmvs/TextureMesh" TARGETS_CMAKE "${TARGETS_CMAKE}")
string(REPLACE "bin/Viewer" "tools/openmvs/Viewer" TARGETS_CMAKE "${TARGETS_CMAKE}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/openmvs/OpenMVSTargets-release.cmake "${TARGETS_CMAKE}")
vcpkg_cmake_config_fixup()
file(READ ${CURRENT_PACKAGES_DIR}/share/${PORT}/OpenMVSTargets-release.cmake TARGETS_CMAKE)
string(REPLACE "bin/InterfaceCOLMAP" "tools/${PORT}/InterfaceCOLMAP" TARGETS_CMAKE "${TARGETS_CMAKE}")
string(REPLACE "bin/InterfaceMetashape" "tools/${PORT}/InterfaceMetashape" TARGETS_CMAKE "${TARGETS_CMAKE}")
string(REPLACE "bin/InterfaceVisualSFM" "tools/${PORT}/InterfaceVisualSFM" TARGETS_CMAKE "${TARGETS_CMAKE}")
string(REPLACE "bin/DensifyPointCloud" "tools/${PORT}/DensifyPointCloud" TARGETS_CMAKE "${TARGETS_CMAKE}")
string(REPLACE "bin/ReconstructMesh" "tools/${PORT}/ReconstructMesh" TARGETS_CMAKE "${TARGETS_CMAKE}")
string(REPLACE "bin/RefineMesh" "tools/${PORT}/RefineMesh" TARGETS_CMAKE "${TARGETS_CMAKE}")
string(REPLACE "bin/TextureMesh" "tools/${PORT}/TextureMesh" TARGETS_CMAKE "${TARGETS_CMAKE}")
string(REPLACE "bin/Viewer" "tools/${PORT}/Viewer" TARGETS_CMAKE "${TARGETS_CMAKE}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/OpenMVSTargets-release.cmake "${TARGETS_CMAKE}")
vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES
DensifyPointCloud
InterfaceCOLMAP
InterfaceMetashape
InterfaceVisualSFM
ReconstructMesh
RefineMesh
@ -68,6 +69,7 @@ set(OPENMVG_TOOLS_PATH "${CURRENT_INSTALLED_DIR}/tools/openmvg")
set(OPENMVS_TOOLS_PATH "${CURRENT_INSTALLED_DIR}/tools/${PORT}")
set(SENSOR_WIDTH_CAMERA_DATABASE_TXT_PATH "${OPENMVG_TOOLS_PATH}/sensor_width_camera_database.txt")
configure_file("${SOURCE_PATH}/MvgMvsPipeline.py.in" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/MvgMvsPipeline.py" @ONLY)
file(INSTALL "${SOURCE_PATH}/build/Modules/FindVCG.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
configure_file("${SOURCE_PATH}/MvgOptimizeSfM.py.in" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/MvgOptimizeSfM.py" @ONLY)
file(INSTALL "${SOURCE_PATH}/build/Modules/FindVCG.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1,9 +1,9 @@
{
"name": "openmvs",
"version": "1.1.1",
"port-version": 3,
"version": "2.0.1",
"description": "OpenMVS: open Multi-View Stereo reconstruction library",
"homepage": "https://cdcseacave.github.io/openMVS",
"license": "AGPL-3.0-only",
"dependencies": [
"boost-iostreams",
"boost-program-options",
@ -32,15 +32,31 @@
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
"zlib"
],
"default-features": [
"nonfree"
],
"features": {
"ceres": {
"description": "CERES support for openmvs",
"dependencies": [
"ceres"
]
},
"cuda": {
"description": "CUDA support for openmvs",
"dependencies": [
"cuda"
]
},
"nonfree": {
"description": "nonfree support for openmvs"
},
"openmp": {
"description": "OpenMP support for openmvs"
}

View File

@ -1,125 +1,5 @@
diff --git a/vcg/complex/algorithms/curve_on_manifold.h b/vcg/complex/algorithms/curve_on_manifold.h
index 5b9d858..f091b4b 100644
--- a/vcg/complex/algorithms/curve_on_manifold.h
+++ b/vcg/complex/algorithms/curve_on_manifold.h
@@ -36,7 +36,7 @@
#include <vcg/space/index/kdtree/kdtree.h>
#include <vcg/math/histogram.h>
#include<vcg/space/distance3.h>
-#include<eigenlib/Eigen/Core>
+#include<eigen3/Eigen/Core>
#include <vcg/complex/algorithms/attribute_seam.h>
#include <wrap/io_trimesh/export_ply.h>
diff --git a/vcg/complex/algorithms/harmonic.h b/vcg/complex/algorithms/harmonic.h
index d004d7b..13d5167 100644
--- a/vcg/complex/algorithms/harmonic.h
+++ b/vcg/complex/algorithms/harmonic.h
@@ -24,7 +24,7 @@
#define __VCGLIB_HARMONIC_FIELD
#include <vcg/complex/complex.h>
-#include <eigenlib/Eigen/Sparse>
+#include <eigen3/Eigen/Sparse>
namespace vcg {
namespace tri {
diff --git a/vcg/complex/algorithms/implicit_smooth.h b/vcg/complex/algorithms/implicit_smooth.h
index 2e1e24f..76311e2 100644
--- a/vcg/complex/algorithms/implicit_smooth.h
+++ b/vcg/complex/algorithms/implicit_smooth.h
@@ -23,7 +23,7 @@
#ifndef __VCG_IMPLICIT_SMOOTHER
#define __VCG_IMPLICIT_SMOOTHER
-#include <eigenlib/Eigen/Sparse>
+#include <eigen3/Eigen/Sparse>
#include <vcg/complex/algorithms/mesh_to_matrix.h>
#include <vcg/complex/algorithms/update/quality.h>
#include <vcg/complex/algorithms/smooth.h>
diff --git a/vcg/complex/algorithms/inertia.h b/vcg/complex/algorithms/inertia.h
index 41b5a29..f25d6f9 100644
--- a/vcg/complex/algorithms/inertia.h
+++ b/vcg/complex/algorithms/inertia.h
@@ -24,8 +24,8 @@
#define _VCG_INERTIA_
-#include <eigenlib/Eigen/Core>
-#include <eigenlib/Eigen/Eigenvalues>
+#include <eigen3/Eigen/Core>
+#include <eigen3/Eigen/Eigenvalues>
#include <vcg/complex/algorithms/update/normal.h>
namespace vcg
diff --git a/vcg/complex/algorithms/parametrization/poisson_solver.h b/vcg/complex/algorithms/parametrization/poisson_solver.h
index cf5c36d..3b8f1a5 100644
--- a/vcg/complex/algorithms/parametrization/poisson_solver.h
+++ b/vcg/complex/algorithms/parametrization/poisson_solver.h
@@ -24,7 +24,7 @@
#ifndef VCG_POISSON_SOLVER
#define VCG_POISSON_SOLVER
-#include <eigenlib/Eigen/Sparse>
+#include <eigen3/Eigen/Sparse>
#include <vcg/complex/algorithms/clean.h>
#include <vcg/complex/algorithms/update/bounding.h>
diff --git a/vcg/complex/algorithms/update/curvature.h b/vcg/complex/algorithms/update/curvature.h
index 441121b..0a96146 100644
--- a/vcg/complex/algorithms/update/curvature.h
+++ b/vcg/complex/algorithms/update/curvature.h
@@ -32,7 +32,7 @@
#include <vcg/complex/algorithms/point_sampling.h>
#include <vcg/complex/algorithms/intersection.h>
#include <vcg/complex/algorithms/inertia.h>
-#include <eigenlib/Eigen/Core>
+#include <eigen3/Eigen/Core>
namespace vcg {
namespace tri {
diff --git a/vcg/complex/algorithms/update/curvature_fitting.h b/vcg/complex/algorithms/update/curvature_fitting.h
index b2b8c63..ab04b6b 100644
--- a/vcg/complex/algorithms/update/curvature_fitting.h
+++ b/vcg/complex/algorithms/update/curvature_fitting.h
@@ -38,11 +38,11 @@
#include <vcg/complex/algorithms/inertia.h>
#include <vcg/complex/algorithms/nring.h>
-#include <eigenlib/Eigen/Core>
-#include <eigenlib/Eigen/QR>
-#include <eigenlib/Eigen/LU>
-#include <eigenlib/Eigen/SVD>
-#include <eigenlib/Eigen/Eigenvalues>
+#include <eigen3/Eigen/Core>
+#include <eigen3/Eigen/QR>
+#include <eigen3/Eigen/LU>
+#include <eigen3/Eigen/SVD>
+#include <eigen3/Eigen/Eigenvalues>
namespace vcg {
diff --git a/vcg/complex/algorithms/update/fitmaps.h b/vcg/complex/algorithms/update/fitmaps.h
index bd2c94f..fd837d7 100644
--- a/vcg/complex/algorithms/update/fitmaps.h
+++ b/vcg/complex/algorithms/update/fitmaps.h
@@ -34,10 +34,10 @@
#include <vcg/complex/algorithms/update/bounding.h>
#include "vcg/complex/algorithms/update/curvature_fitting.h"
-#include <eigenlib/Eigen/Core>
-#include <eigenlib/Eigen/QR>
-#include <eigenlib/Eigen/LU>
-#include <eigenlib/Eigen/SVD>
+#include <eigen3/Eigen/Core>
+#include <eigen3/Eigen/QR>
+#include <eigen3/Eigen/LU>
+#include <eigen3/Eigen/SVD>
#include <vcg/complex/algorithms/nring.h>
diff --git a/vcg/math/eigen.h b/vcg/math/eigen.h
index 5cae402..81f32ff 100644
index 5cae402f..e8f82258 100644
--- a/vcg/math/eigen.h
+++ b/vcg/math/eigen.h
@@ -53,10 +53,10 @@ struct ei_to_vcgtype;
@ -130,96 +10,10 @@ index 5cae402..81f32ff 100644
-#include "../../eigenlib/Eigen/Geometry"
-#include "../../eigenlib/Eigen/Array"
-#include "../../eigenlib/Eigen/Core"
+#include "../../eigen3/Eigen/LU"
+#include "../../eigen3/Eigen/Geometry"
+#include "../../eigen3/Eigen/Array"
+#include "../../eigen3/Eigen/Core"
+#include <eigen3/Eigen/LU>
+#include <eigen3/Eigen/Geometry>
+#include <eigen3/Eigen/Array>
+#include <eigen3/Eigen/Core>
// add support for unsigned char and short int
namespace Eigen {
diff --git a/vcg/math/matrix44.h b/vcg/math/matrix44.h
index a138e57..5291e0e 100644
--- a/vcg/math/matrix44.h
+++ b/vcg/math/matrix44.h
@@ -30,8 +30,8 @@
#include <vcg/space/point4.h>
#include <vector>
#include <iostream>
-#include <eigenlib/Eigen/Core>
-#include <eigenlib/Eigen/LU>
+#include <eigen3/Eigen/Core>
+#include <eigen3/Eigen/LU>
namespace vcg {
diff --git a/vcg/math/polar_decomposition.h b/vcg/math/polar_decomposition.h
index deabf86..bd725d1 100644
--- a/vcg/math/polar_decomposition.h
+++ b/vcg/math/polar_decomposition.h
@@ -26,8 +26,8 @@
#include <vcg/math/matrix33.h>
#include <vcg/math/matrix44.h>
-#include <eigenlib/Eigen/Dense>
-#include <eigenlib/Eigen/SVD>
+#include <eigen3/Eigen/Dense>
+#include <eigen3/Eigen/SVD>
namespace vcg{
diff --git a/vcg/math/quadric.h b/vcg/math/quadric.h
index 8522056..99a9de1 100644
--- a/vcg/math/quadric.h
+++ b/vcg/math/quadric.h
@@ -26,7 +26,7 @@
#include <vcg/space/point3.h>
#include <vcg/space/plane3.h>
#include <vcg/math/matrix33.h>
-#include <eigenlib/Eigen/Core>
+#include <eigen3/Eigen/Core>
namespace vcg {
namespace math {
diff --git a/vcg/space/fitting3.h b/vcg/space/fitting3.h
index e9e238a..6861969 100644
--- a/vcg/space/fitting3.h
+++ b/vcg/space/fitting3.h
@@ -29,8 +29,8 @@
#include <vcg/math/matrix44.h>
#include <vcg/math/matrix33.h>
-#include <eigenlib/Eigen/Core>
-#include <eigenlib/Eigen/Eigenvalues>
+#include <eigen3/Eigen/Core>
+#include <eigen3/Eigen/Eigenvalues>
namespace vcg {
diff --git a/vcg/space/point_matching.h b/vcg/space/point_matching.h
index e9ac0ff..c6ff376 100644
--- a/vcg/space/point_matching.h
+++ b/vcg/space/point_matching.h
@@ -27,8 +27,8 @@
#include <vcg/math/quaternion.h>
#include <vcg/math/matrix44.h>
-#include <eigenlib/Eigen/Dense>
-#include <eigenlib/Eigen/Eigenvalues>
+#include <eigen3/Eigen/Dense>
+#include <eigen3/Eigen/Eigenvalues>
#include <iostream>
namespace vcg
diff --git a/wrap/igl/smooth_field.h b/wrap/igl/smooth_field.h
index e1208cf..a403d54 100644
--- a/wrap/igl/smooth_field.h
+++ b/wrap/igl/smooth_field.h
@@ -25,7 +25,7 @@
#define SMOOTHER_FIELD_H
//eigen stuff
-#include <eigenlib/Eigen/Sparse>
+#include <eigen3/Eigen/Sparse>
//vcg stuff
#include <vcg/complex/algorithms/update/color.h>

View File

@ -0,0 +1,13 @@
diff --git a/vcg/simplex/tetrahedron/pos.h b/vcg/simplex/tetrahedron/pos.h
index d47348ce..078b1f6a 100644
--- a/vcg/simplex/tetrahedron/pos.h
+++ b/vcg/simplex/tetrahedron/pos.h
@@ -385,7 +385,7 @@ public:
void Assert()
#ifdef _DEBUG
{
- HETYPE ht=*this;
+ BasePosType ht=*this;
ht.FlipT();
ht.FlipT();
assert(ht==*this);

View File

@ -1,13 +1,15 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO cnr-isti-vclab/vcglib
REF v1.0.1
SHA512 55d1854054744abae2d41e7b5041df89253bae108df5fc1cfe777013de7192dce04bc474475cb11a1d0343ebcab1ea61b381d9d9c36c452528043e85e75bc211
PATCHES consume-vcpkg-eigen3.patch
REF 2022.02
SHA512 1a4b04c53eb52d0d9864f4e942f0a06e6f4fe5f2b5686fa534b6c68b715941147d89ed6d83bce9dc8d0c7029460824ab1f73231ba6b7c32472becfe641e2a7cb
PATCHES
consume-vcpkg-eigen3.patch
fix-build.patch
)
configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/vcglib/copyright COPYONLY)
file(COPY ${SOURCE_PATH}/vcg/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/vcg)
file(COPY ${SOURCE_PATH}/wrap/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/wrap)
file(COPY ${SOURCE_PATH}/img/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/img)
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1,8 +1,8 @@
{
"name": "vcglib",
"version-string": "1.0.1",
"port-version": 1,
"version-string": "2022.02",
"description": "library for manipulation, processing, cleaning, simplifying triangle meshes.",
"license": "GPL-3.0-only",
"dependencies": [
"eigen3"
]

View File

@ -5197,8 +5197,8 @@
"port-version": 4
},
"openmvs": {
"baseline": "1.1.1",
"port-version": 3
"baseline": "2.0.1",
"port-version": 0
},
"openni2": {
"baseline": "2.2.0.33",
@ -7361,8 +7361,8 @@
"port-version": 0
},
"vcglib": {
"baseline": "1.0.1",
"port-version": 1
"baseline": "2022.02",
"port-version": 0
},
"vcpkg-cmake": {
"baseline": "2022-05-10",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "bf082c0deb661743df2e3c5f658224ccd6375919",
"version": "2.0.1",
"port-version": 0
},
{
"git-tree": "b6123f8755c140325b2800c51c6c68e3fb51c668",
"version": "1.1.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1170b49b3d2980357ba10d68769b0bcfaeda42f7",
"version-string": "2022.02",
"port-version": 0
},
{
"git-tree": "4ed58c0ed176662ca418315c77fb0137c2cf7769",
"version-string": "1.0.1",