Skip to content

Commit f62b38d

Browse files
authored
v2.1.0 (#906)
* 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
1 parent 1d3df16 commit f62b38d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+5126
-1896
lines changed

.appveyor.yml

Lines changed: 0 additions & 124 deletions
This file was deleted.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Continuous Integration
2+
run-name: ${{ github.actor }} is building OpenMVS
3+
4+
on:
5+
push:
6+
branches: [master, develop]
7+
pull_request:
8+
branches: [master, develop]
9+
# Allows to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
env:
13+
CTEST_OUTPUT_ON_FAILURE: 1
14+
15+
defaults:
16+
run:
17+
shell: bash
18+
19+
jobs:
20+
build-tests:
21+
name: Build on ${{ matrix.os }}
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
os: [ubuntu-latest, macOS-latest, windows-latest]
27+
include:
28+
- os: windows-latest
29+
triplet: x64-windows-release
30+
build-type: Release
31+
- os: ubuntu-latest
32+
triplet: x64-linux-release
33+
build-type: Release
34+
- os: macos-latest
35+
triplet: x64-osx
36+
build-type: Release
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v3
40+
41+
- name: Restore artifacts, or setup vcpkg for building artifacts
42+
uses: lukka/run-vcpkg@v10.6
43+
with:
44+
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
45+
vcpkgGitCommitId: '4cb4a5c5ddcb9de0c83c85837ee6974c8333f032'
46+
47+
- name: Install Ubuntu dependencies
48+
if: matrix.os == 'ubuntu-latest'
49+
run: |
50+
sudo apt-get update -y
51+
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
52+
53+
- name: Install macOS dependencies
54+
if: matrix.os == 'macOS-latest'
55+
run: |
56+
brew install automake autoconf-archive
57+
58+
- name: Configure CMake
59+
run: |
60+
cmake -S . -B make -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
61+
62+
- name: Build
63+
working-directory: ./make
64+
run: |
65+
rm -rf ../vcpkg/buildtrees
66+
rm -rf ../vcpkg/downloads
67+
cmake --build . --config ${{ matrix.build-type }} --parallel $(nproc)
68+
69+
- name: Unit Tests
70+
working-directory: ./make
71+
run: |
72+
ctest -j$(nproc) --build-config ${{ matrix.build-type }}
73+
74+
- name: Deploy Windows release
75+
if: matrix.os == 'windows-latest'
76+
uses: actions/upload-artifact@v3
77+
with:
78+
name: OpenMVS_Windows_Release_x64
79+
path: |
80+
${{ github.workspace }}/make/bin/**/x64
81+
!${{ github.workspace }}/make/bin/**/*.exp

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ CMakeSettings.json
3636
.vscode/
3737
out/
3838
bin*/
39+
make*/

BUILD.md

Lines changed: 18 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
Dependencies
33
------------
44

5-
*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.
5+
*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.
66
* [Eigen](http://eigen.tuxfamily.org) version 3.4 or higher
77
* [OpenCV](http://opencv.org) version 2.4 or higher
8-
* [Ceres](http://ceres-solver.org) version 1.10 or higher
8+
* [Ceres](http://ceres-solver.org) version 1.10 or higher (optional)
99
* [CGAL](http://www.cgal.org) version 4.2 or higher
1010
* [Boost](http://www.boost.org) version 1.56 or higher
1111
* [VCG](http://vcg.isti.cnr.it/vcglib)
12-
* [GLFW](http://www.glfw.org)
12+
* [CUDA](https://developer.nvidia.com/cuda-downloads) (optional)
13+
* [GLFW](http://www.glfw.org) (optional)
1314

1415
------------------
1516
Build instructions
@@ -18,127 +19,29 @@ Build instructions
1819
Required tools:
1920
* [CMake](http://www.cmake.org)
2021
* [git](https://git-scm.com)
21-
* C/C++ compiler like Visual Studio or GCC
22+
* C/C++ compiler like Visual Studio 2019, GCC or Clang
2223

23-
-------------------
24-
Windows compilation
25-
-------------------
24+
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`.
2625

27-
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.
26+
The latest pre-built stable binaries can be download from [here](https://github.com/cdcseacave/openMVS_sample/releases/latest).
2827

2928
```
30-
#Make a toplevel directory for deps & build & src somewhere:
31-
mkdir OpenMVS
32-
cd OpenMVS
33-
34-
#Get and install dependencies using vcpkg;
35-
#choose the desired triplet, like "x64-windows", by setting the VCPKG_DEFAULT_TRIPLET environment variable or by specifying it after each package:
36-
vcpkg install zlib boost-iostreams boost-program-options boost-system boost-serialization eigen3 cgal[core] opencv vcglib glew glfw3
37-
38-
#Get VCGLib (Required):
39-
git clone https://github.com/cdcseacave/VCG.git
40-
41-
#Get and unpack OpenMVS in OpenMVS/src:
42-
git clone https://github.com/cdcseacave/openMVS.git src
29+
#Clone OpenMVS
30+
git clone --recurse-submodules https://github.com/cdcseacave/openMVS.git
4331
4432
#Make build directory:
45-
mkdir build
46-
cd build
47-
48-
#Run CMake, where VCPKG_ROOT environment variable points to the root of vcpkg installation:
49-
cmake . ..\src -G "Visual Studio 15 2017 Win64" -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows
50-
51-
#Open the solution in MSVC and build it
52-
```
53-
54-
-----------------
55-
Linux compilation
56-
-----------------
57-
58-
[Ubuntu](http://www.ubuntu.com) 16.04 is used next as the example linux distribution.
59-
60-
```
61-
#Prepare and empty machine for building:
62-
sudo apt-get update -qq && sudo apt-get install -qq
63-
sudo apt-get -y install git cmake libpng-dev libjpeg-dev libtiff-dev libglu1-mesa-dev
64-
main_path=`pwd`
65-
66-
#Eigen (Required)
67-
git clone https://gitlab.com/libeigen/eigen.git --branch 3.4
68-
mkdir eigen_build && cd eigen_build
69-
cmake . ../eigen
70-
make && sudo make install
71-
cd ..
72-
73-
#Boost (Required)
74-
sudo apt-get -y install libboost-iostreams-dev libboost-program-options-dev libboost-system-dev libboost-serialization-dev
75-
76-
#OpenCV (Required)
77-
sudo apt-get -y install libopencv-dev
78-
79-
#CGAL (Required)
80-
sudo apt-get -y install libcgal-dev libcgal-qt5-dev
81-
82-
#VCGLib (Required)
83-
git clone https://github.com/cdcseacave/VCG.git vcglib
84-
85-
#Ceres (Optional)
86-
sudo apt-get -y install libatlas-base-dev libsuitesparse-dev
87-
git clone https://ceres-solver.googlesource.com/ceres-solver ceres-solver
88-
mkdir ceres_build && cd ceres_build
89-
cmake . ../ceres-solver/ -DMINIGLOG=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
90-
make -j2 && sudo make install
91-
cd ..
92-
93-
#GLFW3 (Optional)
94-
sudo apt-get -y install freeglut3-dev libglew-dev libglfw3-dev
95-
96-
#OpenMVS
97-
git clone https://github.com/cdcseacave/openMVS.git openMVS
98-
mkdir openMVS_build && cd openMVS_build
99-
cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib"
100-
101-
#If you want to use OpenMVS as shared library, add to the CMake command:
102-
-DBUILD_SHARED_LIBS=ON
103-
104-
#Install OpenMVS library (optional):
105-
make -j2 && sudo make install
106-
```
107-
108-
--------------------
109-
Mac OS X compilation
110-
--------------------
111-
112-
Install dependencies, run CMake and make.
113-
114-
```
115-
#Install dependencies
116-
brew update
117-
brew install boost eigen opencv cgal
118-
main_path=`pwd`
119-
120-
#GLFW3 (Optional)
121-
brew install glew glfw3
122-
123-
#VCGLib (Required)
124-
git clone https://github.com/cdcseacave/VCG.git vcglib
125-
126-
#Getting the OpenMVS sources:
127-
git clone https://github.com/cdcseacave/openMVS.git
128-
129-
#Build OpenMVS
130-
mkdir openMVS_build && cd openMVS_build
131-
cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib"
33+
cd openMVS
34+
mkdir make
35+
cd make
13236
133-
#Alternatively, build using XCode
134-
cmake . ../openMVS -G "Xcode" -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib"
135-
xcodebuild -configuration Release
37+
#Run CMake:
38+
cmake ..
13639
137-
#If you want to use OpenMVS as shared library, add to the CMake command:
138-
-DBUILD_SHARED_LIBS=ON
40+
#Build:
41+
cmake --build . -j4
13942
14043
#Install OpenMVS library (optional):
141-
make && sudo make install
44+
cmake --install .
14245
```
14346

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

153-
And inside your project CMake script, use:
56+
Inside your project CMake script, use:
15457
```
15558
find_package(OpenMVS)
15659
if(OpenMVS_FOUND)

0 commit comments

Comments
 (0)