From a2040b2274bfb80c861537d1f6beda5046708ad1 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Tue, 1 Dec 2020 11:28:23 -0500 Subject: [PATCH] Entwine --> Untwine --- Dockerfile | 2 +- SuperBuild/CMakeLists.txt | 2 +- ...l-Entwine.cmake => External-Untwine.cmake} | 10 ++++------ opendm/entwine.py | 19 +++++-------------- portable.Dockerfile | 2 +- snap/snapcraft.yaml | 2 +- 6 files changed, 13 insertions(+), 24 deletions(-) rename SuperBuild/cmake/{External-Entwine.cmake => External-Untwine.cmake} (76%) diff --git a/Dockerfile b/Dockerfile index 0f159d8f..603bae42 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ RUN rm -rf \ /code/SuperBuild/build/opencv \ /code/SuperBuild/download \ /code/SuperBuild/src/ceres \ - /code/SuperBuild/src/entwine \ + /code/SuperBuild/src/untwine \ /code/SuperBuild/src/gflags \ /code/SuperBuild/src/hexer \ /code/SuperBuild/src/lastools \ diff --git a/SuperBuild/CMakeLists.txt b/SuperBuild/CMakeLists.txt index e86d2700..f0b0906f 100644 --- a/SuperBuild/CMakeLists.txt +++ b/SuperBuild/CMakeLists.txt @@ -108,7 +108,7 @@ set(custom_libs OpenSfM LASzip Zstd PDAL - Entwine + Untwine MvsTexturing OpenMVS ) diff --git a/SuperBuild/cmake/External-Entwine.cmake b/SuperBuild/cmake/External-Untwine.cmake similarity index 76% rename from SuperBuild/cmake/External-Entwine.cmake rename to SuperBuild/cmake/External-Untwine.cmake index 45c6a7ae..840aa52f 100644 --- a/SuperBuild/cmake/External-Entwine.cmake +++ b/SuperBuild/cmake/External-Untwine.cmake @@ -1,4 +1,4 @@ -set(_proj_name entwine) +set(_proj_name untwine) set(_SB_BINARY_DIR "${SB_BINARY_DIR}/${_proj_name}") ExternalProject_Add(${_proj_name} @@ -8,16 +8,14 @@ ExternalProject_Add(${_proj_name} STAMP_DIR ${_SB_BINARY_DIR}/stamp #--Download step-------------- DOWNLOAD_DIR ${SB_DOWNLOAD_DIR} - GIT_REPOSITORY https://github.com/connormanning/entwine/ - GIT_TAG 2.1.0 + GIT_REPOSITORY https://github.com/pierotofy/untwine/ + GIT_TAG insttgt #--Update/Patch step---------- UPDATE_COMMAND "" #--Configure step------------- SOURCE_DIR ${SB_SOURCE_DIR}/${_proj_name} CMAKE_ARGS - -DCMAKE_CXX_FLAGS=-isystem\ ${SB_SOURCE_DIR}/pdal - -DADDITIONAL_LINK_DIRECTORIES_PATHS=${SB_INSTALL_DIR}/lib - -DWITH_TESTS=OFF + -DPDAL_DIR=${SB_INSTALL_DIR}/lib/cmake/PDAL -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=${SB_INSTALL_DIR} #--Build step----------------- diff --git a/opendm/entwine.py b/opendm/entwine.py index 3c0759a8..d0989cfd 100644 --- a/opendm/entwine.py +++ b/opendm/entwine.py @@ -19,24 +19,15 @@ def build(input_point_cloud_files, output_path, max_concurrency=8, rerun=False): shutil.rmtree(output_path) kwargs = { - 'threads': max_concurrency, + # 'threads': max_concurrency, 'tmpdir': tmpdir, - 'all_inputs': "-i " + " ".join(map(quote, input_point_cloud_files)), + 'files': "--files " + " ".join(map(quote, input_point_cloud_files)), 'outputdir': output_path } - # Run scan to compute dataset bounds - system.run('entwine scan --threads {threads} --tmp "{tmpdir}" {all_inputs} -o "{outputdir}"'.format(**kwargs)) - scan_json = os.path.join(output_path, "scan.json") + # Run untwine + system.run('untwine --temp_dir "{tmpdir}" {files} --output_dir "{outputdir}"'.format(**kwargs)) - if os.path.exists(scan_json): - kwargs['input'] = scan_json - for _ in range(num_files): - # One at a time - system.run('entwine build --threads {threads} --tmp "{tmpdir}" -i "{input}" -o "{outputdir}" --run 1'.format(**kwargs)) - else: - log.ODM_WARNING("%s does not exist, no point cloud will be built." % scan_json) - - + # Cleanup if os.path.exists(tmpdir): shutil.rmtree(tmpdir) \ No newline at end of file diff --git a/portable.Dockerfile b/portable.Dockerfile index 3bd2682d..03ba2ac7 100644 --- a/portable.Dockerfile +++ b/portable.Dockerfile @@ -19,7 +19,7 @@ RUN rm -rf \ /code/SuperBuild/build/opencv \ /code/SuperBuild/download \ /code/SuperBuild/src/ceres \ - /code/SuperBuild/src/entwine \ + /code/SuperBuild/src/untwine \ /code/SuperBuild/src/gflags \ /code/SuperBuild/src/hexer \ /code/SuperBuild/src/lastools \ diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 2020782c..44525576 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -196,7 +196,7 @@ parts: - -odm/SuperBuild/build/openmvs - -odm/SuperBuild/download - -odm/SuperBuild/src/ceres - - -odm/SuperBuild/src/entwine + - -odm/SuperBuild/src/untwine - -odm/SuperBuild/src/gflags - -odm/SuperBuild/src/hexer - -odm/SuperBuild/src/lastools