diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 6f20413f85..aad4eeca51 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -22,7 +22,7 @@ jobs: build-linux: runs-on: ubuntu-latest container: - image: alicevision/alicevision-deps:2024.01.24-centos7-cuda11.3.1 + image: alicevision/alicevision-deps:2024.01.31-centos7-cuda11.3.1 env: DEPS_INSTALL_DIR: /opt/AliceVision_install BUILD_TYPE: Release @@ -167,7 +167,7 @@ jobs: uses: suisei-cn/actions-download-file@v1.3.0 id: vcpkgDownload with: - url: "https://gitlab.com/alicevision/vcpkgArchive/-/raw/main/aliceVisionDeps-2023.10.02.zip?ref_type=heads&inline=false" + url: "https://gitlab.com/alicevision/vcpkgArchive/-/raw/main/aliceVisionDeps-2024.01.31.zip?ref_type=heads&inline=false" target: "${{ env.vcpkgDir }}" filename: installed.zip diff --git a/INSTALL.md b/INSTALL.md index b2aa3a48ee..b744cafd8e 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -100,6 +100,7 @@ vcpkg install ^ assimp ^ pcl ^ clp ^ + libe57format ^ --triplet x64-windows ``` diff --git a/docker/Dockerfile_centos_deps b/docker/Dockerfile_centos_deps index b786d6c29b..817f947117 100644 --- a/docker/Dockerfile_centos_deps +++ b/docker/Dockerfile_centos_deps @@ -38,7 +38,8 @@ RUN $YUM_INSTALL centos-release-scl-rh && \ $YUM_INSTALL python3 && \ $YUM_INSTALL python3-devel && \ yum clean all && \ - $YUM_INSTALL devtoolset-10-toolchain devtoolset-10-libatomic-devel --nogpgcheck && \ + $YUM_INSTALL devtoolset-10-toolchain devtoolset-10-libatomic-devel \ + devtoolset-10-libasan-devel devtoolset-10-libubsan-devel --nogpgcheck && \ $YUM_INSTALL --enablerepo=extras epel-release && \ $YUM_INSTALL file \ git \ @@ -51,7 +52,8 @@ RUN $YUM_INSTALL centos-release-scl-rh && \ automake \ which \ openssl-devel \ - pcre2-devel + pcre2-devel \ + xerces-c-devel # Install numpy for Python3 RUN pip3 install numpy @@ -137,6 +139,8 @@ RUN test -e /usr/local/cuda/lib64/libcublas.so || ln -s /usr/lib64/libcublas.so # RUN make -j ${CPU_CORES} opencv # RUN make -j ${CPU_CORES} expat # RUN make -j ${CPU_CORES} SWIG +# RUN make -j ${CPU_CORES} E57Format + # RUN make -j ${CPU_CORES} cctag # RUN make -j ${CPU_CORES} popsift diff --git a/docker/Dockerfile_ubuntu_deps b/docker/Dockerfile_ubuntu_deps index 8d688b73e0..56c02ca03d 100644 --- a/docker/Dockerfile_ubuntu_deps +++ b/docker/Dockerfile_ubuntu_deps @@ -43,6 +43,7 @@ RUN . ./etc/os-release && \ cmake \ gfortran \ clang-format \ + libxerces-c-dev \ gcc-10 \ g++-10 \ cpp-10 \ @@ -113,6 +114,8 @@ RUN test -e /usr/local/cuda/lib64/libcublas.so || ln -s /usr/lib/x86_64-linux-gn # RUN make -j ${CPU_CORES} opencv # RUN make -j ${CPU_CORES} expat # RUN make -j ${CPU_CORES} SWIG +# RUN make -j ${CPU_CORES} E57Format + # RUN make -j ${CPU_CORES} popsift # RUN make -j ${CPU_CORES} cctag diff --git a/docker/build-centos.sh b/docker/build-centos.sh index 392b28fc33..860ac6879a 100755 --- a/docker/build-centos.sh +++ b/docker/build-centos.sh @@ -7,7 +7,7 @@ test -e docker/fetch.sh || { exit 1 } -test -z "$AV_DEPS_VERSION" && AV_DEPS_VERSION=2024.01.24 +test -z "$AV_DEPS_VERSION" && AV_DEPS_VERSION=2024.01.31 test -z "$AV_VERSION" && AV_VERSION="$(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short HEAD)" test -z "$CUDA_VERSION" && CUDA_VERSION=11.3.1 test -z "$CENTOS_VERSION" && CENTOS_VERSION=7 diff --git a/docker/build-ubuntu.sh b/docker/build-ubuntu.sh index eb7446122a..87abac94b8 100755 --- a/docker/build-ubuntu.sh +++ b/docker/build-ubuntu.sh @@ -6,7 +6,7 @@ test -e docker/fetch.sh || { exit 1 } -test -z "$AV_DEPS_VERSION" && AV_DEPS_VERSION=2024.01.24 +test -z "$AV_DEPS_VERSION" && AV_DEPS_VERSION=2024.01.31 test -z "$AV_VERSION" && AV_VERSION="$(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short HEAD)" test -z "$CUDA_VERSION" && CUDA_VERSION=11.3.1 test -z "$UBUNTU_VERSION" && UBUNTU_VERSION=20.04 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8045ba9b5e..2924d2bb45 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -56,6 +56,7 @@ option(ALICEVISION_BUILD_PANORAMA "Build AliceVision panorama part" ON) option(ALICEVISION_BUILD_SOFTWARE "Build AliceVision command line tools." ON) option(ALICEVISION_BUILD_COVERAGE "Enable code coverage generation (gcc only)" OFF) option(ALICEVISION_BUILD_SWIG_BINDING "Build the Python binding with SWIG." OFF) +trilean_option(ALICEVISION_BUILD_LIDAR "Build AliceVision LIDAR part" AUTO) trilean_option(ALICEVISION_BUILD_DOC "Build AliceVision documentation" AUTO) trilean_option(ALICEVISION_USE_OPENMP "Enable OpenMP parallelization" ON) @@ -94,6 +95,7 @@ if(NOT ALICEVISION_BUILD_SFM) SET(ALICEVISION_BUILD_SEGMENTATION OFF) SET(ALICEVISION_BUILD_STEREOPHOTOMETRY OFF) SET(ALICEVISION_BUILD_PANORAMA OFF) + SET(ALICEVISION_BUILD_LIDAR OFF) endif() # ============================================================================== @@ -454,10 +456,6 @@ if(ALICEVISION_BUILD_SFM) endif() endif() -if(ALICEVISION_BUILD_SFM) - find_package(E57Format CONFIG) -endif() - # ============================================================================== # CoinUtils, Clp, Osi # ============================================================================== @@ -467,11 +465,26 @@ if(ALICEVISION_BUILD_SFM) find_package(Osi REQUIRED) endif() - +# ============================================================================== +# Lemon +# ============================================================================== if(ALICEVISION_BUILD_SFM) find_package(LEMON REQUIRED) endif() +# ============================================================================== +# libE57Format +# ============================================================================== +if(NOT ALICEVISION_BUILD_LIDAR STREQUAL "OFF") + find_package(E57Format) + + if(E57Format_FOUND) + message(STATUS "E57Format found") + elseif(ALICEVISION_BUILD_LIDAR STREQUAL "ON") + message(SEND_ERROR "Failed to find E57Format") + endif() +endif() + # ============================================================================== # Assimp @@ -942,6 +955,7 @@ message("** Target architecture: " ${TARGET_ARCHITECTURE}) message("** Build Shared libs: " ${BUILD_SHARED_LIBS}) message("** Build SfM part: " ${ALICEVISION_BUILD_SFM}) message("** Build MVS part: " ${ALICEVISION_BUILD_MVS}) +message("** Build LIDAR part: " ${ALICEVISION_BUILD_LIDAR}) message("** Build AliceVision tests: " ${ALICEVISION_BUILD_TESTS}) message("** Build AliceVision documentation: " ${ALICEVISION_HAVE_DOC}) message("** Build AliceVision+OpenCV samples programs: " ${ALICEVISION_HAVE_OPENCV}) @@ -972,6 +986,10 @@ if(ALICEVISION_BUILD_SFM) message(STATUS "LEMON: " ${LEMON_VERSION} "") endif() +if(NOT ALICEVISION_BUILD_LIDAR STREQUAL "OFF") + message(STATUS "E57FORMAT: " ${E57Format} "") +endif() + if(ALICEVISION_BUILD_SWIG_BINDING) message("\n") message(STATUS "SWIG: " ${SWIG_VERSION} "") diff --git a/src/aliceVision/dataio/CMakeLists.txt b/src/aliceVision/dataio/CMakeLists.txt index 7c34d1a1db..6ffc7cce8f 100644 --- a/src/aliceVision/dataio/CMakeLists.txt +++ b/src/aliceVision/dataio/CMakeLists.txt @@ -19,7 +19,7 @@ if(ALICEVISION_HAVE_OPENCV) list(APPEND dataio_files_sources VideoFeed.cpp) endif() -if(TARGET E57Format) +if(NOT ALICEVISION_BUILD_LIDAR STREQUAL "OFF") list(APPEND dataio_files_headers E57Reader.hpp) list(APPEND dataio_files_sources E57Reader.cpp) endif() @@ -40,6 +40,6 @@ if(ALICEVISION_HAVE_OPENCV) target_link_libraries(aliceVision_dataio PRIVATE ${OpenCV_LIBS}) endif() -if (TARGET E57Format) - target_link_libraries(aliceVision_dataio PRIVATE E57Format) -endif() \ No newline at end of file +if(NOT ALICEVISION_BUILD_LIDAR STREQUAL "OFF") + target_link_libraries(aliceVision_dataio PRIVATE E57Format) +endif() diff --git a/src/cmake/Dependencies.cmake b/src/cmake/Dependencies.cmake index 2f65b92082..d4d78193f3 100644 --- a/src/cmake/Dependencies.cmake +++ b/src/cmake/Dependencies.cmake @@ -28,6 +28,7 @@ option(AV_BUILD_OSI "Enable building an embedded Osi" ON) option(AV_BUILD_CLP "Enable building an embedded Clp" ON) option(AV_BUILD_FLANN "Enable building an embedded Flann" ON) option(AV_BUILD_LEMON "Enable building an embedded LEMON library" ON) +option(AV_BUILD_E57FORMAT "Enable building an embedded E57Format" ON) option(AV_BUILD_PCL "Enable building an embedded PointCloud library" OFF) option(AV_BUILD_USD "Enable building an embedded USD library" OFF) option(AV_BUILD_GEOGRAM "Enable building an embedded Geogram library" ON) @@ -76,6 +77,7 @@ message(STATUS "AV_BUILD_FLANN: ${AV_BUILD_FLANN}") message(STATUS "AV_BUILD_PCL: ${AV_BUILD_PCL}") message(STATUS "AV_BUILD_USD: ${AV_BUILD_USD}") message(STATUS "AV_BUILD_LEMON: ${AV_BUILD_LEMON}") +message(STATUS "AV_BUILD_E57FORMAT: ${AV_BUILD_E57FORMAT}") message(STATUS "AV_BUILD_GEOGRAM: ${AV_BUILD_GEOGRAM}") message(STATUS "AV_BUILD_TBB ${AV_BUILD_TBB}") message(STATUS "AV_BUILD_EIGEN ${AV_BUILD_EIGEN}") @@ -1277,6 +1279,29 @@ if(AV_BUILD_SWIG) ) endif() +if(AV_BUILD_E57FORMAT) + # Add libE57Format + set(E57FORMAT_TARGET E57Format) + + ExternalProject_add(${E57FORMAT_TARGET} + GIT_REPOSITORY https://github.com/asmaloney/libE57Format.git + GIT_TAG v3.1.1 + DOWNLOAD_DIR ${BUILD_DIR}/download/${E57FORMAT_TARGET} + PREFIX ${BUILD_DIR} + BUILD_IN_SOURCE 0 + BUILD_ALWAYS 0 + UPDATE_COMMAND "" + SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/${E57FORMAT_TARGET} + BINARY_DIR ${BUILD_DIR}/${E57FORMAT_TARGET}_build + INSTALL_DIR ${CMAKE_INSTALL_PREFIX} + CONFIGURE_COMMAND ${CMAKE_COMMAND} + -DCMAKE_INSTALL_PREFIX:PATH= + BUILD_COMMAND $(MAKE) -j${AV_BUILD_DEPENDENCIES_PARALLEL} + ) + + set(E57FORMAT_CMAKE_FLAGS -DE57FORMAT_DIR:PATH=${CMAKE_INSTALL_PREFIX}/share/E57Format) +endif() + set(AV_DEPS ${ZLIB_TARGET} ${ASSIMP_TARGET} @@ -1310,6 +1335,7 @@ set(AV_DEPS ${LZ4_TARGET} ${LEMON_TARGET} ${SWIG_TARGET} + ${E57FORMAT_TARGET} ) if(AV_BUILD_ALICEVISION) @@ -1359,6 +1385,7 @@ if(AV_BUILD_ALICEVISION) ${PCL_CMAKE_FLAGS} ${USD_CMAKE_FLAGS} ${SWIG_CMAKE_FLAGS} + ${E57FORMAT_CMAKE_FLAGS} -DCMAKE_INSTALL_PREFIX:PATH= DEPENDS ${AV_DEPS}