diff --git a/README.md b/README.md index 842f011..b3e73bb 100755 --- a/README.md +++ b/README.md @@ -21,7 +21,8 @@ install_build_windows.bat ``` git clone --recursive https://github.com/edin45/openPT3D.git (or unzip the zip you download from the stable release) cd openPT3D && cd externalSoftware -sh install_build_arch.sh +sh install_build_arch_cpu.sh for cpu or +sh install_build_arch_gpu.sh for gpu (CUDA) ``` ### Debian/Ubuntu/Pop OS installation: @@ -29,8 +30,8 @@ sh install_build_arch.sh ``` git clone --recursive https://github.com/edin45/openPT3D.git (or unzip the zip you download from the stable release) cd openPT3D && cd externalSoftware -sh install_python3_debian.sh -sh install_build_debian.sh +sh install_build_debian_cpu.sh for cpu or +sh install_build_debian_gpu.sh for gpu (CUDA) ``` ### Usage: @@ -49,5 +50,5 @@ python main.py -i [FOLDER_WITH_INPUT_IMAGES_TO_USE] -r [FOLDER_WHERE_RESULTS_ARE #### Debian: ``` -python3.9 main.py -i [FOLDER_WITH_INPUT_IMAGES_TO_USE] -r [FOLDER_WHERE_RESULTS_ARE_STORED] +python3 main.py -i [FOLDER_WITH_INPUT_IMAGES_TO_USE] -r [FOLDER_WHERE_RESULTS_ARE_STORED] ``` diff --git a/externalSoftware/install_build_arch.sh b/externalSoftware/install_build_arch_cpu.sh similarity index 86% rename from externalSoftware/install_build_arch.sh rename to externalSoftware/install_build_arch_cpu.sh index 40aa559..395c808 100755 --- a/externalSoftware/install_build_arch.sh +++ b/externalSoftware/install_build_arch_cpu.sh @@ -86,15 +86,15 @@ wait pacman -S freeglut glew glfw pugixml wait #OpenMVS -#git clone https://github.com/cdcseacave/openMVS.git openMVS -wget -c "https://github.com/cdcseacave/openMVS/archive/refs/tags/v2.0.tar.gz" -wait -tar -xf v2.0.tar.gz +git clone https://github.com/cdcseacave/openMVS.git openMVS +#wget -c "https://github.com/cdcseacave/openMVS/archive/refs/tags/v2.0.tar.gz" wait +#tar -xf v2.0.tar.gz +#wait mkdir openMVS_Linux_CPU && cd openMVS_Linux_CPU wait echo "Using CPU" -cmake . ../openMVS-2.0 -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib" -DOpenMVS_USE_CUDA=OFF +cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib" -DOpenMVS_USE_CUDA=OFF wait #Install OpenMVS library (optional): make -j6 diff --git a/externalSoftware/install_build_arch_gpu.sh b/externalSoftware/install_build_arch_gpu.sh new file mode 100755 index 0000000..0a08327 --- /dev/null +++ b/externalSoftware/install_build_arch_gpu.sh @@ -0,0 +1,100 @@ +#! /bin/bash +if [ "$EUID" -ne 0 ] + then echo "Please run as root" + exit +fi +pacman -S opencv gperf +wait +pacman -S cgal +wait +pacman -S lvtk +wait +pacman -S python +wait +pacman -S python-pip +wait +pip install opencv-python +wait +pip install numpy +wait +pacman -S vtk +wait +pacman -S curl zip unzip tar +wait +#git clone https://github.com/Microsoft/vcpkg +#wait +#cd vcpkg +#wait +#./bootstrap-vcpkg.sh +#wait +#./vcpkg install cereal ceres eigen3 libjpeg-turbo libpng tiff +#wait +#cd .. +#wait +#wget -c "https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.tar.bz2" +#wait +#tar -xf boost_1_74_0.tar.bz2 +#wait +#cd boost_1_74_0 +#wait +#./bootstrap.sh --prefix=/usr --with-python=python3 && +#wait +#./b2 stage -j4 threading=multi link=shared +#wait +#./b2 install threading=multi link=shared +#wait +#cd .. +#wait +pacman -S cmake libpng libjpeg libtiff mesa boost +wait +pacman -S graphviz +wait +main_path=`pwd` +wait +#Eigen (Required) +git clone https://gitlab.com/libeigen/eigen.git --branch 3.4 +wait +mkdir eigen_build && cd eigen_build +wait +cmake . ../eigen +wait +make && sudo make install +wait +cd .. +wait +pacman -S libstdc++5 make +wait +pacman -Syu lib32-gcc-libs +wait +pacman -S gcc=libs +wait +pacman -S egl-wayland eglexternalplatform eigen gflags google-glog ninja +wait +#VCGLib (Required) +git clone https://github.com/cdcseacave/VCG.git vcglib +wait +git clone https://ceres-solver.googlesource.com/ceres-solver ceres-solver +wait +mkdir ceres_build && cd ceres_build +wait +cmake . ../ceres-solver/ -DMINIGLOG=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF +wait +make -j6 && sudo make install +wait +cd .. +wait +pacman -S freeglut glew glfw pugixml +wait +#OpenMVS +git clone https://github.com/cdcseacave/openMVS.git openMVS +#wget -c "https://github.com/cdcseacave/openMVS/archive/refs/tags/v2.0.tar.gz" +wait +#tar -xf v2.0.tar.gz +#wait +mkdir openMVS_Linux_CPU && cd openMVS_Linux_CPU +wait +echo "Using CPU" +cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib" +wait +#Install OpenMVS library (optional): +make -j6 diff --git a/externalSoftware/install_build_debian.sh b/externalSoftware/install_build_debian_cpu.sh similarity index 88% rename from externalSoftware/install_build_debian.sh rename to externalSoftware/install_build_debian_cpu.sh index fb3fcca..91189d5 100755 --- a/externalSoftware/install_build_debian.sh +++ b/externalSoftware/install_build_debian_cpu.sh @@ -5,9 +5,11 @@ if ! [ $(id -u) = 0 ]; then fi sudo apt update && sudo apt upgrade wait -python3.9 -m pip install opencv-python +sudo apt install python3 python3-pip wait -python3.9 -m pip install numpy +pip install opencv-python +wait +pip install numpy wait apt install curl zip unzip tar bison libopencv-dev gperf autoconf libjpeg62-dev #wget -c "http://ftp.de.debian.org/debian/pool/main/libj/libjpeg-turbo/libjpeg-dev_2.0.6-4_amd64.deb" @@ -83,14 +85,12 @@ wait sudo apt-get -y install freeglut3-dev libglew-dev libglfw3-dev wait #OpenMVS -wget -c "https://github.com/cdcseacave/openMVS/archive/refs/tags/v2.0.tar.gz" -wait -tar -xf v2.0.tar.gz +git clone https://github.com/cdcseacave/openMVS.git openMVS wait mkdir openMVS_Linux_CPU && cd openMVS_Linux_CPU wait echo "Using CPU" -cmake . ../openMVS-2.0 -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib" -DOpenMVS_USE_CUDA=OFF +cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib" -DOpenMVS_USE_CUDA=OFF wait #Install OpenMVS library (optional): make -j6 \ No newline at end of file diff --git a/externalSoftware/install_build_debian_gpu.sh b/externalSoftware/install_build_debian_gpu.sh new file mode 100755 index 0000000..ab26a9a --- /dev/null +++ b/externalSoftware/install_build_debian_gpu.sh @@ -0,0 +1,96 @@ +#!/bin/bash +if ! [ $(id -u) = 0 ]; then + echo "Please run as root!" + exit 1 +fi +sudo apt update && sudo apt upgrade +wait +sudo apt install python3 python3-pip +wait +pip install opencv-python +wait +pip install numpy +wait +apt install curl zip unzip tar bison libopencv-dev gperf autoconf libjpeg62-dev +#wget -c "http://ftp.de.debian.org/debian/pool/main/libj/libjpeg-turbo/libjpeg-dev_2.0.6-4_amd64.deb" +#wait +#dpkg -i libjpeg-dev_2.0.6-4_amd64.deb +wait +git clone https://github.com/Microsoft/vcpkg +wait +cd vcpkg +wait +./bootstrap-vcpkg.sh +wait +./vcpkg install cereal ceres eigen3 libpng tiff opencv +wait +cd .. +wget -c "https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.tar.bz2" +wait +tar -xf boost_1_74_0.tar.bz2 +wait +cd boost_1_74_0 +wait +./bootstrap.sh --prefix=/usr --with-python=python3 && +wait +./b2 stage -j4 threading=multi link=shared +wait +./b2 install threading=multi link=shared +wait +cd .. +#Prepare and empty machine for building: +sudo apt-get update -qq && sudo apt-get install -qq +wait +sudo apt-get -y install git cmake libpng-dev libjpeg-dev libtiff-dev libglu1-mesa-dev +wait +main_path=`pwd` +wait +#Eigen (Required) +git clone https://gitlab.com/libeigen/eigen.git --branch 3.4 +wait +mkdir eigen_build && cd eigen_build +wait +cmake . ../eigen +wait +make && sudo make install +wait +cd .. +wait +#Boost (Required) +sudo apt-get -y install libboost-iostreams-dev libboost-program-options-dev libboost-system-dev libboost-serialization-dev +wait +#OpenCV (Required) +sudo apt-get -y install libopencv-dev +wait +#CGAL (Required) +sudo apt-get -y install libcgal-dev libcgal-qt5-dev +wait +#VCGLib (Required) +git clone https://github.com/cdcseacave/VCG.git vcglib +wait +#Ceres (Optional) +sudo apt-get -y install libatlas-base-dev libsuitesparse-dev +wait +git clone https://ceres-solver.googlesource.com/ceres-solver ceres-solver +wait +mkdir ceres_build && cd ceres_build +wait +cmake . ../ceres-solver/ -DMINIGLOG=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF +wait +make -j2 && sudo make install +wait +cd .. +wait +#GLFW3 (Optional) +sudo apt-get -y install freeglut3-dev libglew-dev libglfw3-dev +wait +#OpenMVS +git clone https://github.com/cdcseacave/openMVS.git openMVS +wait +mkdir openMVS_Linux_CPU && cd openMVS_Linux_CPU +wait +echo "Using GPU" +cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib" +wait +#Install OpenMVS library (optional): +make -j6 \ No newline at end of file