Skip to content

Commit

Permalink
v2.1.0 (#906)
Browse files Browse the repository at this point in the history
* Improve depth-map estimation in textureless areas using multi-resolution
* Add texture sharpening
* Ground plane estimation
* Estimate volume from the reconstructed mesh
* Texture transfer between two meshes
* Automatic Region-Of-Interest estimation
* Simplify build with vcpkg
* Add tests
* Add Continuous Integration action
* Various bug fixes
  • Loading branch information
cdcseacave authored Nov 28, 2022
1 parent 1d3df16 commit f62b38d
Show file tree
Hide file tree
Showing 86 changed files with 5,126 additions and 1,896 deletions.
124 changes: 0 additions & 124 deletions .appveyor.yml

This file was deleted.

81 changes: 81 additions & 0 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Continuous Integration
run-name: ${{ github.actor }} is building OpenMVS

on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]
# Allows to run this workflow manually from the Actions tab
workflow_dispatch:

env:
CTEST_OUTPUT_ON_FAILURE: 1

defaults:
run:
shell: bash

jobs:
build-tests:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
include:
- os: windows-latest
triplet: x64-windows-release
build-type: Release
- os: ubuntu-latest
triplet: x64-linux-release
build-type: Release
- os: macos-latest
triplet: x64-osx
build-type: Release
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Restore artifacts, or setup vcpkg for building artifacts
uses: lukka/run-vcpkg@v10.6
with:
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgGitCommitId: '4cb4a5c5ddcb9de0c83c85837ee6974c8333f032'

- name: Install Ubuntu dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update -y
sudo apt-get install -y autoconf-archive libxmu-dev libdbus-1-dev libxtst-dev libxi-dev libxinerama-dev libxcursor-dev xorg-dev libgl-dev libglu1-mesa-dev pkg-config
- name: Install macOS dependencies
if: matrix.os == 'macOS-latest'
run: |
brew install automake autoconf-archive
- name: Configure CMake
run: |
cmake -S . -B make -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
- name: Build
working-directory: ./make
run: |
rm -rf ../vcpkg/buildtrees
rm -rf ../vcpkg/downloads
cmake --build . --config ${{ matrix.build-type }} --parallel $(nproc)
- name: Unit Tests
working-directory: ./make
run: |
ctest -j$(nproc) --build-config ${{ matrix.build-type }}
- name: Deploy Windows release
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: OpenMVS_Windows_Release_x64
path: |
${{ github.workspace }}/make/bin/**/x64
!${{ github.workspace }}/make/bin/**/*.exp
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ CMakeSettings.json
.vscode/
out/
bin*/
make*/
133 changes: 18 additions & 115 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
Dependencies
------------

*OpenMVS* relies on a number of open source libraries, some of which are optional. For details on customizing the build process, see the compilation instructions.
*OpenMVS* relies on a number of open source libraries, some optional, which are managed automatically by [vcpkg](https://github.com/Microsoft/vcpkg). For details on customizing the build process, see the build instructions.
* [Eigen](http://eigen.tuxfamily.org) version 3.4 or higher
* [OpenCV](http://opencv.org) version 2.4 or higher
* [Ceres](http://ceres-solver.org) version 1.10 or higher
* [Ceres](http://ceres-solver.org) version 1.10 or higher (optional)
* [CGAL](http://www.cgal.org) version 4.2 or higher
* [Boost](http://www.boost.org) version 1.56 or higher
* [VCG](http://vcg.isti.cnr.it/vcglib)
* [GLFW](http://www.glfw.org)
* [CUDA](https://developer.nvidia.com/cuda-downloads) (optional)
* [GLFW](http://www.glfw.org) (optional)

------------------
Build instructions
Expand All @@ -18,127 +19,29 @@ Build instructions
Required tools:
* [CMake](http://www.cmake.org)
* [git](https://git-scm.com)
* C/C++ compiler like Visual Studio or GCC
* C/C++ compiler like Visual Studio 2019, GCC or Clang

-------------------
Windows compilation
-------------------
The dependencies can be fetched and built automatically using `vcpkg` on all major platform, by setting the environment variable `VCPKG_ROOT` to point to its path or by using the `cmake` parameter `-DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake`.

Visual Studio 2008 or newer are supported. Please note that the development is done mainly on Windows, so this platform build is well tested. The latest pre-built binaries for fast testing can be download from [here](https://github.com/cdcseacave/openMVS_sample/releases/latest). Visual Studio 2017 and dependencies automation tool [vcpkg](https://github.com/Microsoft/vcpkg) are used in this example.
The latest pre-built stable binaries can be download from [here](https://github.com/cdcseacave/openMVS_sample/releases/latest).

```
#Make a toplevel directory for deps & build & src somewhere:
mkdir OpenMVS
cd OpenMVS
#Get and install dependencies using vcpkg;
#choose the desired triplet, like "x64-windows", by setting the VCPKG_DEFAULT_TRIPLET environment variable or by specifying it after each package:
vcpkg install zlib boost-iostreams boost-program-options boost-system boost-serialization eigen3 cgal[core] opencv vcglib glew glfw3
#Get VCGLib (Required):
git clone https://github.com/cdcseacave/VCG.git
#Get and unpack OpenMVS in OpenMVS/src:
git clone https://github.com/cdcseacave/openMVS.git src
#Clone OpenMVS
git clone --recurse-submodules https://github.com/cdcseacave/openMVS.git
#Make build directory:
mkdir build
cd build
#Run CMake, where VCPKG_ROOT environment variable points to the root of vcpkg installation:
cmake . ..\src -G "Visual Studio 15 2017 Win64" -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows
#Open the solution in MSVC and build it
```

-----------------
Linux compilation
-----------------

[Ubuntu](http://www.ubuntu.com) 16.04 is used next as the example linux distribution.

```
#Prepare and empty machine for building:
sudo apt-get update -qq && sudo apt-get install -qq
sudo apt-get -y install git cmake libpng-dev libjpeg-dev libtiff-dev libglu1-mesa-dev
main_path=`pwd`
#Eigen (Required)
git clone https://gitlab.com/libeigen/eigen.git --branch 3.4
mkdir eigen_build && cd eigen_build
cmake . ../eigen
make && sudo make install
cd ..
#Boost (Required)
sudo apt-get -y install libboost-iostreams-dev libboost-program-options-dev libboost-system-dev libboost-serialization-dev
#OpenCV (Required)
sudo apt-get -y install libopencv-dev
#CGAL (Required)
sudo apt-get -y install libcgal-dev libcgal-qt5-dev
#VCGLib (Required)
git clone https://github.com/cdcseacave/VCG.git vcglib
#Ceres (Optional)
sudo apt-get -y install libatlas-base-dev libsuitesparse-dev
git clone https://ceres-solver.googlesource.com/ceres-solver ceres-solver
mkdir ceres_build && cd ceres_build
cmake . ../ceres-solver/ -DMINIGLOG=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
make -j2 && sudo make install
cd ..
#GLFW3 (Optional)
sudo apt-get -y install freeglut3-dev libglew-dev libglfw3-dev
#OpenMVS
git clone https://github.com/cdcseacave/openMVS.git openMVS
mkdir openMVS_build && cd openMVS_build
cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib"
#If you want to use OpenMVS as shared library, add to the CMake command:
-DBUILD_SHARED_LIBS=ON
#Install OpenMVS library (optional):
make -j2 && sudo make install
```

--------------------
Mac OS X compilation
--------------------

Install dependencies, run CMake and make.

```
#Install dependencies
brew update
brew install boost eigen opencv cgal
main_path=`pwd`
#GLFW3 (Optional)
brew install glew glfw3
#VCGLib (Required)
git clone https://github.com/cdcseacave/VCG.git vcglib
#Getting the OpenMVS sources:
git clone https://github.com/cdcseacave/openMVS.git
#Build OpenMVS
mkdir openMVS_build && cd openMVS_build
cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib"
cd openMVS
mkdir make
cd make
#Alternatively, build using XCode
cmake . ../openMVS -G "Xcode" -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib"
xcodebuild -configuration Release
#Run CMake:
cmake ..
#If you want to use OpenMVS as shared library, add to the CMake command:
-DBUILD_SHARED_LIBS=ON
#Build:
cmake --build . -j4
#Install OpenMVS library (optional):
make && sudo make install
cmake --install .
```

-------------------
Expand All @@ -150,7 +53,7 @@ In order to use *OpenMVS* as a third-party library in your project, first compil
vcpkg install openmvs
```

And inside your project CMake script, use:
Inside your project CMake script, use:
```
find_package(OpenMVS)
if(OpenMVS_FOUND)
Expand Down
Loading

0 comments on commit f62b38d

Please sign in to comment.