diff --git a/ports/openmvg/0001-eigen_3.4.0.patch b/ports/openmvg/0001-eigen_3.4.0.patch index be81355dd4e5c1..a4e759f52ebb36 100644 --- a/ports/openmvg/0001-eigen_3.4.0.patch +++ b/ports/openmvg/0001-eigen_3.4.0.patch @@ -1,25 +1,13 @@ -From 7be28dca0403660e721d66de954f27b92897163e Mon Sep 17 00:00:00 2001 -From: Alberto Luaces -Date: Wed, 8 Sep 2021 18:00:53 +0200 -Subject: [PATCH] eigen_3.4.0 - ---- - src/openMVG/multiview/solver_fundamental_kernel.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - diff --git a/src/openMVG/multiview/solver_fundamental_kernel.cpp b/src/openMVG/multiview/solver_fundamental_kernel.cpp -index 5e0c12eb..fa025198 100644 +index 2ffd45a..bbf74b4 100644 --- a/src/openMVG/multiview/solver_fundamental_kernel.cpp +++ b/src/openMVG/multiview/solver_fundamental_kernel.cpp -@@ -134,7 +134,7 @@ void EightPointSolver::Solve - MatX9 epipolar_constraint(x1.cols(), 9); - epipolar_constraint.fill(0.0); - EncodeEpipolarEquation(x1, x2, &epipolar_constraint); -- Eigen::SelfAdjointEigenSolver solver -+ Eigen::SelfAdjointEigenSolver> solver - (epipolar_constraint.transpose() * epipolar_constraint); - f = solver.eigenvectors().leftCols<1>(); - } --- -2.30.2 - +@@ -110,7 +110,7 @@ void EightPointSolver::Solve + x2.colwise().homogeneous(), + &epipolar_constraint); + // Find the F matrice in the nullspace of epipolar_constraint. +- Eigen::SelfAdjointEigenSolver solver ++ Eigen::SelfAdjointEigenSolver> solver + (epipolar_constraint.transpose() * epipolar_constraint); + f = solver.eigenvectors().leftCols<1>(); + diff --git a/ports/openmvg/build_fixes.patch b/ports/openmvg/build_fixes.patch index 3b2b199b4b29ae..fecc458bdddf53 100644 --- a/ports/openmvg/build_fixes.patch +++ b/ports/openmvg/build_fixes.patch @@ -1,8 +1,8 @@ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 9cfd06c..8859469 100644 +index 5d909ec..ab7eb6f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -14,6 +14,7 @@ if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) +@@ -20,6 +20,7 @@ if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) message(FATAL_ERROR "In-source builds not allowed.") endif() @@ -10,16 +10,15 @@ index 9cfd06c..8859469 100644 # ============================================================================== # OpenMVG build options # ============================================================================== -@@ -31,7 +32,7 @@ option(OpenMVG_USE_OPENMP "Enable OpenMP parallelization" ON) +@@ -37,6 +38,7 @@ option(OpenMVG_USE_OPENMP "Enable OpenMP parallelization" ON) # and openMVG simultaneously # ============================================================================== option(OpenMVG_USE_OPENCV "Build or not opencv+openMVG samples programs" OFF) -- +endif() + # ============================================================================== # Since OpenCV 3, SIFT is no longer in the default modules. See - # https://github.com/itseez/opencv_contrib for more informations. -@@ -85,6 +86,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") +@@ -95,6 +97,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") register_definitions(-DOPENMVG_STD_UNORDERED_MAP) endif() @@ -27,7 +26,7 @@ index 9cfd06c..8859469 100644 # ============================================================================== # Check that submodule have been initialized and updated # ============================================================================== -@@ -93,6 +95,7 @@ if (NOT EXISTS ${PROJECT_SOURCE_DIR}/dependencies/cereal/include) +@@ -103,6 +106,7 @@ if (NOT EXISTS ${PROJECT_SOURCE_DIR}/dependencies/cereal/include) "\n submodule(s) are missing, please update your repository:\n" " > git submodule update -i\n") endif() @@ -35,7 +34,7 @@ index 9cfd06c..8859469 100644 # ============================================================================== # Additional cmake find modules -@@ -128,7 +131,6 @@ if (OpenMVG_USE_OPENMP) +@@ -138,7 +142,6 @@ if (OpenMVG_USE_OPENMP) find_package(OpenMP) if (OPENMP_FOUND) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") @@ -43,7 +42,7 @@ index 9cfd06c..8859469 100644 register_definitions(-DOPENMVG_USE_OPENMP) if (NOT MSVC) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") -@@ -139,11 +141,6 @@ if (OpenMVG_USE_OPENMP) +@@ -149,11 +152,6 @@ if (OpenMVG_USE_OPENMP) endif() endif (NOT MSVC) endif (OPENMP_FOUND) @@ -55,22 +54,21 @@ index 9cfd06c..8859469 100644 endif (OpenMVG_USE_OPENMP) # ============================================================================== -@@ -160,10 +157,10 @@ endif() +@@ -170,9 +168,10 @@ endif() # ============================================================================== # IMAGE IO detection # ============================================================================== -find_package(JPEG QUIET) -find_package(PNG QUIET) -find_package(TIFF QUIET) -- +find_package(JPEG REQUIRED) +find_package(PNG REQUIRED) +find_package(TIFF REQUIRED) +find_package(vlfeat REQUIRED) + # Folders set_property(GLOBAL PROPERTY USE_FOLDERS ON) - -@@ -182,6 +179,7 @@ if (OpenMVG_BUILD_OPENGL_EXAMPLES) +@@ -192,6 +191,7 @@ if (OpenMVG_BUILD_OPENGL_EXAMPLES) set_property(TARGET glfw PROPERTY FOLDER OpenMVG/3rdParty/glfw) endif (OpenMVG_BUILD_OPENGL_EXAMPLES) @@ -78,16 +76,15 @@ index 9cfd06c..8859469 100644 # Dependencies install rules install( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/ -@@ -189,7 +187,7 @@ install( +@@ -199,6 +199,7 @@ install( COMPONENT headers FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h" ) -- +endif() + # ============================================================================== # --END-- SUBMODULE CONFIGURATION - # ============================================================================== -@@ -225,6 +223,7 @@ ENDMACRO(UNIT_TEST) +@@ -235,6 +236,7 @@ ENDMACRO(UNIT_TEST) # - external by default # - internal if cereal not found # ============================================================================== @@ -95,18 +92,19 @@ index 9cfd06c..8859469 100644 find_package(cereal QUIET CONFIG) if (NOT TARGET cereal) add_library(cereal INTERFACE) -@@ -237,6 +236,10 @@ if (NOT TARGET cereal) +@@ -247,7 +249,11 @@ if (NOT TARGET cereal) set(OpenMVG_USE_INTERNAL_CEREAL ON) endif() +endif() -+ + +find_package(cereal REQUIRED CONFIG) +get_target_property(CEREAL_INCLUDE_DIRS cereal INTERFACE_INCLUDE_DIRECTORIES) - ++ # ============================================================================== # Eigen -@@ -245,6 +248,7 @@ endif() + # ============================================================================== +@@ -255,6 +261,7 @@ endif() # - external if EIGEN_INCLUDE_DIR_HINTS is defined # - internal if Eigen not found # ============================================================================== @@ -114,17 +112,18 @@ index 9cfd06c..8859469 100644 find_package(Eigen3 QUIET) if (NOT Eigen3_FOUND) set(EIGEN_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/eigen) -@@ -253,13 +257,17 @@ if (NOT Eigen3_FOUND) +@@ -263,6 +270,10 @@ if (NOT Eigen3_FOUND) else() set(EIGEN_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR}) endif() +endif() - ++ +find_package(Eigen3 REQUIRED) +set(EIGEN_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR}) + # ============================================================================== # Ceres - # ============================================================================== +@@ -270,6 +281,7 @@ endif() # - external by default if CERES_DIR_HINTS or find_package found a valid Ceres # - internal if ceres not found (ceres-solver+cxsparse+miniglog) # ============================================================================== @@ -132,16 +131,17 @@ index 9cfd06c..8859469 100644 find_package(Ceres QUIET HINTS ${CERES_DIR_HINTS}) if (NOT Ceres_FOUND) set(OpenMVG_USE_INTERNAL_CERES ON) -@@ -271,13 +279,16 @@ if (NOT Ceres_FOUND) +@@ -281,6 +293,9 @@ if (NOT Ceres_FOUND) STRING(REGEX REPLACE "version ([0-9.]+).*" "\\1" CERES_VERSION ${CERES_CONFIG}) set(CERES_LIBRARIES openMVG_ceres) endif() +endif() - ++ +find_package(Ceres REQUIRED) + # ============================================================================== # Flann - # ============================================================================== +@@ -288,6 +303,7 @@ endif() # - internal by default (flann), # - external if FLANN_INCLUDE_DIR_HINTS and a valid Flann setup is found # ============================================================================== @@ -149,16 +149,17 @@ index 9cfd06c..8859469 100644 if (NOT DEFINED FLANN_INCLUDE_DIR_HINTS) set(FLANN_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/flann/src/cpp) set(OpenMVG_USE_INTERNAL_FLANN ON) -@@ -286,13 +297,16 @@ find_package(Flann QUIET) +@@ -296,6 +312,9 @@ find_package(Flann QUIET) if (NOT FLANN_FOUND OR OpenMVG_USE_INTERNAL_FLANN) set(FLANN_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/flann/src/cpp) endif() +endif() - ++ +find_package(flann REQUIRED) + # ============================================================================== # CoinUtils - # ============================================================================== +@@ -303,6 +322,7 @@ endif() # - internal by default (CoinUtils), # - external if COINUTILS_INCLUDE_DIR_HINTS and a valid CoinUtils setup is found # ============================================================================== @@ -166,16 +167,17 @@ index 9cfd06c..8859469 100644 if (NOT DEFINED COINUTILS_INCLUDE_DIR_HINTS) set(COINUTILS_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/CoinUtils/src/) set(OpenMVG_USE_INTERNAL_COINUTILS ON) -@@ -302,13 +316,16 @@ if (NOT DEFINED COINUTILS_INCLUDE_DIR_HINTS) +@@ -312,6 +332,9 @@ if (NOT DEFINED COINUTILS_INCLUDE_DIR_HINTS) else() find_package(CoinUtils QUIET) endif() +endif() - ++ +find_package(CoinUtils REQUIRED) + ## ============================================================================== ## Clp - ## ============================================================================== +@@ -319,6 +342,7 @@ endif() ## - internal by default (Clp), ## - external if CLP_INCLUDE_DIR_HINTS and a valid Clp setup is found ## ============================================================================== @@ -183,17 +185,17 @@ index 9cfd06c..8859469 100644 if (NOT DEFINED CLP_INCLUDE_DIR_HINTS) set(CLP_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Clp/src/) set(OpenMVG_USE_INTERNAL_CLP ON) -@@ -320,6 +337,9 @@ if (NOT DEFINED CLP_INCLUDE_DIR_HINTS) +@@ -330,13 +354,17 @@ if (NOT DEFINED CLP_INCLUDE_DIR_HINTS) else() find_package(Clp QUIET) endif() +endif() -+ -+find_package(Clp REQUIRED) ++find_package(Clp REQUIRED) ++ # ============================================================================== # Osi -@@ -327,6 +347,7 @@ endif() + # ============================================================================== # - internal by default (Osi), # - external if OSI_INCLUDE_DIR_HINTS and a valid Osi setup is found # ============================================================================== @@ -201,7 +203,7 @@ index 9cfd06c..8859469 100644 if (NOT DEFINED OSI_INCLUDE_DIR_HINTS) set(OSI_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Osi/src/) set(OpenMVG_USE_INTERNAL_OSI ON) -@@ -336,6 +357,9 @@ if (NOT DEFINED OSI_INCLUDE_DIR_HINTS) +@@ -346,6 +374,9 @@ if (NOT DEFINED OSI_INCLUDE_DIR_HINTS) else() find_package(Osi QUIET) endif() @@ -211,7 +213,7 @@ index 9cfd06c..8859469 100644 # ============================================================================== # Internal CLP/OSI/COINUTILS libraries: -@@ -354,6 +378,7 @@ endif() +@@ -364,6 +395,7 @@ endif() # - internal by default (Lemon), # - external if LEMON_INCLUDE_DIR_HINTS and a valid Lemon setup is found # ============================================================================== @@ -219,9 +221,9 @@ index 9cfd06c..8859469 100644 if (NOT DEFINED LEMON_INCLUDE_DIR_HINTS) set(LEMON_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/lemon) set(OpenMVG_USE_INTERNAL_LEMON ON) -@@ -365,6 +390,9 @@ if (NOT LEMON_FOUND OR OpenMVG_USE_INTERNAL_LEMON) +@@ -374,6 +406,9 @@ if (NOT LEMON_FOUND OR OpenMVG_USE_INTERNAL_LEMON) + ${CMAKE_CURRENT_SOURCE_DIR}/third_party/lemon ${PROJECT_BINARY_DIR}/third_party/lemon) - set(LEMON_LIBRARY openMVG_lemon) endif() +endif() + @@ -229,7 +231,7 @@ index 9cfd06c..8859469 100644 # ============================================================================== # OpenCV -@@ -372,20 +400,13 @@ endif() +@@ -381,12 +416,7 @@ endif() # - only external and enabled only if OpenMVG_USE_OPENCV is set to ON # ============================================================================== if (OpenMVG_USE_OPENCV) @@ -239,11 +241,11 @@ index 9cfd06c..8859469 100644 - UPDATE_CACHE_VARIABLE(OpenMVG_USE_OPENCV OFF) - UPDATE_CACHE_VARIABLE(OpenMVG_USE_OCVSIFT OFF) - endif() -+ find_package( OpenCV REQUIRED ) ++ find_package( OpenCV REQUIRED ) endif() -- - # ============================================================================== + +@@ -394,7 +424,6 @@ endif() # Third-party libraries: # ============================================================================== add_subdirectory(third_party) @@ -251,7 +253,7 @@ index 9cfd06c..8859469 100644 # ============================================================================== # openMVG modules -@@ -472,67 +493,67 @@ message("** Use OpenCV SIFT features: " ${OpenMVG_USE_OCVSIFT}) +@@ -481,67 +510,67 @@ message("** Use OpenCV SIFT features: " ${OpenMVG_USE_OCVSIFT}) message("\n") @@ -331,23 +333,22 @@ index 9cfd06c..8859469 100644 else() message(STATUS "LEMON: " ${LEMON_VERSION} " (external)") diff --git a/src/cmakeFindModules/FindClp.cmake b/src/cmakeFindModules/FindClp.cmake -index 8a69c23..6a81580 100644 +index 8a69c23..6ebc661 100644 --- a/src/cmakeFindModules/FindClp.cmake +++ b/src/cmakeFindModules/FindClp.cmake -@@ -51,9 +51,8 @@ IF(EXISTS "${CLP_DIR}" AND NOT "${CLP_DIR}" STREQUAL "") +@@ -50,8 +50,8 @@ IF(EXISTS "${CLP_DIR}" AND NOT "${CLP_DIR}" STREQUAL "") + ENDIF (NOT EXISTS ${CLP_VERSION_FILE}) SET(CLP_INCLUDE_DIR ${CLP_DIR}) - FIND_LIBRARY(CLP_LIBRARY NAMES Clp) +- FIND_LIBRARY(CLP_LIBRARY NAMES Clp) - FIND_LIBRARY(CLPSOLVER_LIBRARY NAMES ClpSolver) -- FIND_LIBRARY(OSICLP_LIBRARY NAMES OsiClp) -- + FIND_LIBRARY(CLPSOLVER_LIBRARY NAMES ClpSolver Clp) + FIND_LIBRARY(OSICLP_LIBRARY NAMES OsiClp Clp) + FIND_LIBRARY(OSICLP_LIBRARY NAMES OsiClp) + # locate Clp libraries - IF(DEFINED CLP_LIBRARY AND DEFINED CLPSOLVER_LIBRARY AND DEFINED OSICLP_LIBRARY) - SET(CLP_LIBRARIES ${CLP_LIBRARY} ${CLPSOLVER_LIBRARY} ${OSICLP_LIBRARY}) diff --git a/src/cmakeFindModules/OpenMVGConfig.cmake.in b/src/cmakeFindModules/OpenMVGConfig.cmake.in -index e7dfbfd..c01910d 100644 +index e7dfbfd..65224c4 100644 --- a/src/cmakeFindModules/OpenMVGConfig.cmake.in +++ b/src/cmakeFindModules/OpenMVGConfig.cmake.in @@ -19,7 +19,7 @@ @@ -359,11 +360,12 @@ index e7dfbfd..c01910d 100644 # unsets all public (designed to be used externally) variables and reports # error message at priority depending upon [REQUIRED/QUIET/] argument. macro(OPENMVG_REPORT_NOT_FOUND REASON_MSG) -@@ -59,9 +59,19 @@ set(CALLERS_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) +@@ -58,10 +58,20 @@ set(CALLERS_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) + # Reset CMake module path to the installation directory of this # script. set(CMAKE_MODULE_PATH ${CURRENT_CONFIG_INSTALL_DIR}) - +include(CMakeFindDependencyMacro) ++ +find_dependency(CoinUtils) +find_dependency(Clp) +find_dependency(Osi) @@ -372,7 +374,7 @@ index e7dfbfd..c01910d 100644 +find_dependency(cereal) +find_dependency(Ceres) +find_dependency(vlfeat) -+ + # Build the absolute root install directory as a relative path get_filename_component(CURRENT_ROOT_INSTALL_DIR - ${CMAKE_MODULE_PATH}/../../../ ABSOLUTE) @@ -500,10 +502,10 @@ index cc5212f..acc57dd 100644 $ ) diff --git a/src/openMVG/matching/CMakeLists.txt b/src/openMVG/matching/CMakeLists.txt -index 5fcd972..b21ea7b 100644 +index 2e0eafd..be0006f 100644 --- a/src/openMVG/matching/CMakeLists.txt +++ b/src/openMVG/matching/CMakeLists.txt -@@ -18,6 +18,7 @@ list(REMOVE_ITEM matching_files_cpp ${REMOVEFILESUNITTEST}) +@@ -16,6 +16,7 @@ list(REMOVE_ITEM matching_files_cpp ${REMOVEFILESUNITTEST}) set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) @@ -511,7 +513,7 @@ index 5fcd972..b21ea7b 100644 set_source_files_properties(${matching_files_cpp} PROPERTIES LANGUAGE CXX) add_library(openMVG_matching -@@ -39,10 +40,10 @@ target_link_libraries(openMVG_matching +@@ -37,10 +38,10 @@ target_link_libraries(openMVG_matching Threads::Threads cereal ) @@ -538,18 +540,19 @@ index 1f3fc30..4097320 100644 $) else() diff --git a/src/openMVG_Samples/describe_and_match_GUI/CMakeLists.txt b/src/openMVG_Samples/describe_and_match_GUI/CMakeLists.txt -index 862ffc7..326fc9a 100644 +index 862ffc7..62508af 100644 --- a/src/openMVG_Samples/describe_and_match_GUI/CMakeLists.txt +++ b/src/openMVG_Samples/describe_and_match_GUI/CMakeLists.txt -@@ -18,7 +18,7 @@ if (OpenMVG_BUILD_GUI_SOFTWARES) +@@ -18,8 +18,7 @@ if (OpenMVG_BUILD_GUI_SOFTWARES) add_executable( openMVG_sample_describe_and_match_GUI WIN32 ${FEATURES_PAIR_DEMO_SRCS} ${FEATURES_PAIR_DEMO_HDRS} ) endif( APPLE ) - target_link_libraries( openMVG_sample_describe_and_match_GUI Qt5::Widgets openMVG_features openMVG_image openMVG_matching vlsift ) +- + target_link_libraries( openMVG_sample_describe_and_match_GUI Qt5::Widgets openMVG_features openMVG_image openMVG_matching unofficial::vlfeat::vl ) - set_target_properties( openMVG_sample_describe_and_match_GUI PROPERTIES CXX_STANDARD 11) + set_property(TARGET openMVG_sample_describe_and_match_GUI PROPERTY FOLDER OpenMVG/Samples) diff --git a/src/openMVG_Samples/features_image_matching/CMakeLists.txt b/src/openMVG_Samples/features_image_matching/CMakeLists.txt index 18fb385..d44ffce 100644 --- a/src/openMVG_Samples/features_image_matching/CMakeLists.txt @@ -590,7 +593,7 @@ index 2f60393..0d57d0a 100644 # Installation rules diff --git a/src/software/SfM/CMakeLists.txt b/src/software/SfM/CMakeLists.txt -index 013a6c8..f38daa9 100644 +index 6db7e83..51e06f5 100644 --- a/src/software/SfM/CMakeLists.txt +++ b/src/software/SfM/CMakeLists.txt @@ -44,7 +44,7 @@ target_link_libraries(openMVG_main_ComputeFeatures @@ -602,7 +605,7 @@ index 013a6c8..f38daa9 100644 ) if (MSVC) set_target_properties(openMVG_main_ComputeFeatures PROPERTIES COMPILE_FLAGS "/bigobj") -@@ -235,7 +235,7 @@ if(OpenMVG_USE_OPENCV) +@@ -275,7 +275,7 @@ if(OpenMVG_USE_OPENCV) openMVG_multiview openMVG_sfm ${STLPLUS_LIBRARY} @@ -612,7 +615,7 @@ index 013a6c8..f38daa9 100644 target_include_directories(openMVG_main_ComputeFeatures_OpenCV PRIVATE ${OpenCV_INCLUDE_DIRS}) diff --git a/src/software/SfM/SfM_GlobalPipeline.py.in b/src/software/SfM/SfM_GlobalPipeline.py.in -index 42405a4..28b0246 100644 +index 42b41cc..7fda0cd 100644 --- a/src/software/SfM/SfM_GlobalPipeline.py.in +++ b/src/software/SfM/SfM_GlobalPipeline.py.in @@ -21,7 +21,7 @@ @@ -624,14 +627,8 @@ index 42405a4..28b0246 100644 import os import subprocess -@@ -77,5 +77,3 @@ pRecons.wait() - - pRecons = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_ComputeSfM_DataColor"), "-i", reconstruction_dir+"/robust.bin", "-o", os.path.join(reconstruction_dir,"robust_colorized.ply")] ) - pRecons.wait() -- -- diff --git a/src/software/SfM/SfM_SequentialPipeline.py.in b/src/software/SfM/SfM_SequentialPipeline.py.in -index 9a5a482..e804a19 100644 +index 423c85c..0ff2e77 100644 --- a/src/software/SfM/SfM_SequentialPipeline.py.in +++ b/src/software/SfM/SfM_SequentialPipeline.py.in @@ -21,7 +21,7 @@ @@ -643,27 +640,8 @@ index 9a5a482..e804a19 100644 import os import subprocess -@@ -77,5 +77,3 @@ pRecons.wait() - - pRecons = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_ComputeSfM_DataColor"), "-i", reconstruction_dir+"/robust.bin", "-o", os.path.join(reconstruction_dir,"robust_colorized.ply")] ) - pRecons.wait() -- -- -diff --git a/src/software/SfM/main_ComputeFeatures_OpenCV.cpp b/src/software/SfM/main_ComputeFeatures_OpenCV.cpp -index 9cc46af..f8bd892 100644 ---- a/src/software/SfM/main_ComputeFeatures_OpenCV.cpp -+++ b/src/software/SfM/main_ComputeFeatures_OpenCV.cpp -@@ -208,7 +208,7 @@ public: - // Create a SIFT detector - std::vector< cv::KeyPoint > v_keypoints; - cv::Mat m_desc; -- cv::Ptr siftdetector = cv::xfeatures2d::SIFT::create(); -+ cv::Ptr siftdetector = cv::SIFT::create(); - - // Process SIFT computation - siftdetector->detectAndCompute(img, m_mask, v_keypoints, m_desc); diff --git a/src/software/SfM/tutorial_demo.py.in b/src/software/SfM/tutorial_demo.py.in -index 259e24e..1097062 100644 +index c7361f3..1c56aab 100644 --- a/src/software/SfM/tutorial_demo.py.in +++ b/src/software/SfM/tutorial_demo.py.in @@ -12,7 +12,7 @@ @@ -675,12 +653,6 @@ index 259e24e..1097062 100644 import os import subprocess -@@ -89,5 +89,3 @@ pRecons.wait() - print ("4. Structure from Known Poses (robust triangulation)") - pRecons = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_ComputeStructureFromKnownPoses"), "-i", reconstruction_dir+"/sfm_data.bin", "-m", matches_dir, "-o", os.path.join(reconstruction_dir,"robust.ply")] ) - pRecons.wait() -- -- diff --git a/src/software/VO/Tracker_opencv_klt.hpp b/src/software/VO/Tracker_opencv_klt.hpp index aa7dffe..2c4d237 100644 --- a/src/software/VO/Tracker_opencv_klt.hpp @@ -695,7 +667,7 @@ index aa7dffe..2c4d237 100644 m_detector->detect(current_img, m_nextKeypoints); diff --git a/src/third_party/CMakeLists.txt b/src/third_party/CMakeLists.txt -index b71dfab..ad98e51 100644 +index 0d61c9f..05c8b29 100644 --- a/src/third_party/CMakeLists.txt +++ b/src/third_party/CMakeLists.txt @@ -18,7 +18,7 @@ add_subdirectory(stlplus3) @@ -705,9 +677,9 @@ index b71dfab..ad98e51 100644 -if(DEFINED OpenMVG_USE_INTERNAL_LEMON) +if(OpenMVG_USE_INTERNAL_LEMON) add_subdirectory(lemon) - set_property(TARGET openMVG_lemon PROPERTY FOLDER OpenMVG/3rdParty/lemon) - set_property(TARGET check PROPERTY FOLDER OpenMVG/3rdParty/lemon) -@@ -68,7 +68,7 @@ endif (NOT TIFF_FOUND) + set(LEMON_LIBRARY openMVG_lemon PARENT_SCOPE) + endif() +@@ -67,7 +67,7 @@ endif (NOT TIFF_FOUND) add_subdirectory(vectorGraphics) # Add ceres-solver (A Nonlinear Least Squares Minimizer) @@ -716,7 +688,7 @@ index b71dfab..ad98e51 100644 add_subdirectory(cxsparse) add_subdirectory(ceres-solver) set_property(TARGET openMVG_cxsparse PROPERTY FOLDER OpenMVG/3rdParty/ceres) -@@ -76,7 +76,7 @@ if (DEFINED OpenMVG_USE_INTERNAL_CERES) +@@ -75,7 +75,7 @@ if (DEFINED OpenMVG_USE_INTERNAL_CERES) endif() # Add an Approximate Nearest Neighbor library @@ -725,12 +697,12 @@ index b71dfab..ad98e51 100644 set(FLANN_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/openMVG/third_party/flann/src/cpp) add_subdirectory(flann) endif() -@@ -90,7 +90,7 @@ add_subdirectory(fast) +@@ -89,7 +89,7 @@ add_subdirectory(fast) ## # Install Header only libraries if necessary ## -if (DEFINED OpenMVG_USE_INTERNAL_EIGEN) +if (OpenMVG_USE_INTERNAL_EIGEN) #Configure Eigen install - set(EIGEN_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/openMVG/third_party/eigen) + set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/openMVG/third_party/eigen) add_subdirectory(eigen) diff --git a/ports/openmvg/portfile.cmake b/ports/openmvg/portfile.cmake index bb8d115ee8f553..aacf749be34861 100644 --- a/ports/openmvg/portfile.cmake +++ b/ports/openmvg/portfile.cmake @@ -10,8 +10,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO openMVG/openMVG - REF 74deb33d12bf275a3b3a9afc833f4760be90f031 # v1.6 - SHA512 6e74effbc66f5d5e7c2d5edd7dacf3c0fa7eec1cb666244db8e4147c08d2e6faca98c1164ca1305a5013d247d479184742e5156232d4d8430615af31811e216e + REF d0fe73dd426ae4001631a51272cff71047522df9 # v2.0 + SHA512 1d5c68971ad63ced46d8b9070bdacc1065b4ba950fe919e11f952a004def87d4d83a474d48aee714c21b12106d7d81187d3670d8a2e6daf2d3c5fceb008a5de3 PATCHES build_fixes.patch 0001-eigen_3.4.0.patch @@ -19,11 +19,7 @@ vcpkg_from_github( set(OpenMVG_USE_OPENMP OFF) if("openmp" IN_LIST FEATURES) - if(VCPKG_TARGET_IS_WINDOWS) - message(WARNING "OpenMP feature is broken on Windows, disabled until fixed https://github.com/openMVG/openMVG/issues/1765") - else() set(OpenMVG_USE_OPENMP ON) - endif() endif() vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS @@ -53,9 +49,8 @@ file(REMOVE_RECURSE ${SOURCE_PATH}/src/cmakeFindModules/FindEigen.cmake ${SOURCE_PATH}/src/cmakeFindModules/FindClp.cmake ${SOURCE_PATH}/src/cmakeFindModules/FindOsi.cmake) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH}/src - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}/src" OPTIONS ${FEATURE_OPTIONS} -DOpenMVG_USE_OPENMP=${OpenMVG_USE_OPENMP} -DOpenMVG_BUILD_SHARED=OFF @@ -74,29 +69,29 @@ vcpkg_configure_cmake( -DOpenMVG_USE_INTERNAL_LEMON=OFF ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/openMVG/cmake) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH share/openMVG/cmake) if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/openMVG/image/image_test - ${CURRENT_PACKAGES_DIR}/include/openMVG/exif/image_data - ${CURRENT_PACKAGES_DIR}/include/openMVG_dependencies/nonFree/sift/vl) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/openMVG/image/image_test" + "${CURRENT_PACKAGES_DIR}/include/openMVG/exif/image_data" + "${CURRENT_PACKAGES_DIR}/include/openMVG_dependencies/nonFree/sift/vl") if(OpenMVG_BUILD_SHARED) if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") # release - file(GLOB DLL_FILES ${CURRENT_PACKAGES_DIR}/lib/*.dll) - file(COPY ${DLL_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${DLL_FILES}) + file(GLOB DLL_FILES "${CURRENT_PACKAGES_DIR}/lib/*.dll") + file(COPY "${DLL_FILES}" DESTINATION "${CURRENT_PACKAGES_DIR}/bin") + file(REMOVE_RECURSE "${DLL_FILES}") endif() if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") # debug - file(GLOB DLL_FILES ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) - file(COPY ${DLL_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE_RECURSE ${DLL_FILES}) + file(GLOB DLL_FILES "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") + file(COPY "${DLL_FILES}" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") + file(REMOVE_RECURSE "${DLL_FILES}") endif() endif() vcpkg_copy_pdbs() @@ -107,10 +102,10 @@ if("software" IN_LIST FEATURES) openMVG_main_AlternativeVO.app ui_openMVG_MatchesViewer.app ) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/openMVG_main_AlternativeVO.app) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ui_openMVG_MatchesViewer.app) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/openMVG_main_AlternativeVO.app) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ui_openMVG_MatchesViewer.app) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/openMVG_main_AlternativeVO.app") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/ui_openMVG_MatchesViewer.app") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/openMVG_main_AlternativeVO.app") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/ui_openMVG_MatchesViewer.app") else() vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES openMVG_main_AlternativeVO @@ -135,9 +130,6 @@ if("software" IN_LIST FEATURES) openMVG_main_ExportUndistortedImages openMVG_main_FrustumFiltering openMVG_main_geodesy_registration_to_gps_position - openMVG_main_GlobalSfM - openMVG_main_IncrementalSfM - openMVG_main_IncrementalSfM2 openMVG_main_ListMatchingPairs openMVG_main_MatchesToTracks openMVG_main_openMVG2Agisoft @@ -157,21 +149,22 @@ if("software" IN_LIST FEATURES) openMVG_main_SfM_Localization openMVG_main_SplitMatchFileIntoMatchFiles ui_openMVG_control_points_registration + openMVG_main_GeometricFilter + openMVG_main_PairGenerator + openMVG_main_SfM ) if("opencv" IN_LIST FEATURES) vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES - openMVG_main_ComputeFeatures_OpenCV - ) + openMVG_main_ComputeFeatures_OpenCV) endif() - file(COPY ${SOURCE_PATH}/src/openMVG/exif/sensor_width_database/sensor_width_camera_database.txt DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) - set(OPENMVG_SOFTWARE_SFM_BUILD_DIR ${CURRENT_INSTALLED_DIR}/tools/${PORT}) - set(OPENMVG_CAMERA_SENSOR_WIDTH_DIRECTORY ${CURRENT_INSTALLED_DIR}/tools/${PORT}) + file(COPY "${SOURCE_PATH}/src/openMVG/exif/sensor_width_database/sensor_width_camera_database.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + set(OPENMVG_SOFTWARE_SFM_BUILD_DIR "${CURRENT_INSTALLED_DIR}/tools/${PORT}") + set(OPENMVG_CAMERA_SENSOR_WIDTH_DIRECTORY "${CURRENT_INSTALLED_DIR}/tools/${PORT}") configure_file("${SOURCE_PATH}/src/software/SfM/tutorial_demo.py.in" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/tutorial_demo.py" @ONLY) configure_file("${SOURCE_PATH}/src/software/SfM/SfM_GlobalPipeline.py.in" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/SfM_GlobalPipeline.py" @ONLY) configure_file("${SOURCE_PATH}/src/software/SfM/SfM_SequentialPipeline.py.in" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/SfM_SequentialPipeline.py" @ONLY) - message(STATUS "To use tools, you need graphviz installed and manually added to path (to have neato executable)") endif() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/openmvg/vcpkg.json b/ports/openmvg/vcpkg.json index 42686e60a0b712..28732cc07d52fd 100644 --- a/ports/openmvg/vcpkg.json +++ b/ports/openmvg/vcpkg.json @@ -1,7 +1,6 @@ { "name": "openmvg", - "version": "1.6", - "port-version": 3, + "version": "2.0", "description": "open Multiple View Geometry library. Basis for 3D computer vision and Structure from Motion.", "dependencies": [ "cereal", @@ -21,6 +20,14 @@ "libpng", "osi", "tiff", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, "vlfeat", "zlib" ], diff --git a/versions/baseline.json b/versions/baseline.json index 0d5691254e69ec..5bdb96ef952c4b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4997,8 +4997,8 @@ "port-version": 3 }, "openmvg": { - "baseline": "1.6", - "port-version": 3 + "baseline": "2.0", + "port-version": 0 }, "openmvs": { "baseline": "1.1.1", diff --git a/versions/o-/openmvg.json b/versions/o-/openmvg.json index 1731c064e518f9..ca980eaaa60dfb 100644 --- a/versions/o-/openmvg.json +++ b/versions/o-/openmvg.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "08113de9c7bc1b9201be4c3a01c1c3e5a1cf5acd", + "version": "2.0", + "port-version": 0 + }, { "git-tree": "6f3087d8d002d7f226e77427ce363e2b20371485", "version": "1.6",