Skip to content

Commit

Permalink
v2.0 (#719)
Browse files Browse the repository at this point in the history
* dense: add image mask support

* dense: fix bug in mask application

* build: update find packages

* build: fix usage as third-party library

* interface: export and compare camera poses with an OpenMVG refined version

* interface: export MVS scene to NVM format

* common: fix camera scaling

* dense: small code refactor

* mvs: view DMAPs with different resolution

* interface: replace define with constexp

* interface: small change

* common: fix PFM exporter/importer

* common: disable CPUID on ARM platforms

* dense: add Region-Of-Interest (ROI) support

* common: improve octree speed

* build: update AppVeyor

* mesh: split mesh in sub-meshed by max area

* dense: split scene in sub-scenes

* cmake: build libCommon/IO/Math as shared if BUILD_SHARED_LIBS=ON (#650)

* mesh: fix bug in RemoveFaces()

* dense: filter more redundant views from sub-scenes

* common: add ZSTD serialization support

* apps: set internal linkage for functions and variables (#656)

* common: small refactor

* mesh: raster triangles using barycentric coordinates

* remove cotire

* dense: merge small sub-scenes

* interface: import COLMAP depth-maps

* interface: add MVS preset to the python script

* interface: fix COLMAP on linux

* common: make binary projects portable

* viewer: display views seeing selected point or points seen by the current view

* dense: improve depth-map initialization

* dense: merge depth-maps (no fusion)

* interface: add similarity transform functionality

* common: fix file permissions on linux

* mesh: add GLTF writing support

* mesh: add target-face-num parameter to ReconstructMesh (#671)

* mesh: improve GLTF support

* dense: add geometric-consistency

* dense: fix for invalid images

(cherry picked from commit b29648f835e5ee0b36b4240a160a20124001f34d)

* dense: close file in reading invalid depth-map (#685)

* dense: export point-cloud with min number of views per point

(cherry picked from commit 9b6b2fd7ec89a5b7ea3acdef83664daccbfc8c03)

* dense: detect computed depth-maps

(cherry picked from commit 52f9162874e4c3da66bb618dcea9dddc1bdf644a)

* refine: initialize image neighbors from input mesh

(cherry picked from commit 2a069fa0856582da2b766ba85091d3e46fa783de)

* dense: select better angle neighbors

(cherry picked from commit 05a49551ad13873c664bf394d4584cf5c44f198c)

* dense: patch-match implemented in CUDA (faster & better)

* common: fix latest boost

* dense: expose --cuda-device option (#707)

* build: add Dockerfile for CUDA #710

* dense: fix bug in selecting views

(cherry picked from commit d068c02295234199f49b26afc85ac643886f2311)

* build: fix CUDA for older cards (#712)

* dense: fix small clusters (#702)

* interface: fix COLMAP log export

* interface: add Metashape and predefined neighbors list support

* interface: fix compile linux

* dense: add support for scenes with empty point-cloud but known (coarse) mesh

* dense: filter low score estimates

* interface: add Metashape ROI support

* viewer: display ROI

* dense: increase NCC threshold for CUDA

* interface: remap Metashape indices

* dense: fix depth-map crash in CUDA

* interface: update MVG-MVS pipeline

Co-authored-by: YOSHIFUJI Naoki <lwisteria.ao@gmail.com>
Co-authored-by: Piero Toffanin <pt@masseranolabs.com>
Co-authored-by: Tommy Bojanin <Bojanint@gmail.com>
  • Loading branch information
4 people authored Dec 11, 2021
1 parent a69a52c commit 961b1fe
Show file tree
Hide file tree
Showing 97 changed files with 39,159 additions and 6,318 deletions.
9 changes: 4 additions & 5 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,17 @@ for:
# remove outdated versions
- vcpkg remove --outdated --recurse
# install dependencies
- vcpkg install --recurse --triplet %VCPKG_ARCH% zlib boost-iostreams boost-program-options boost-system boost-serialization eigen3 cgal[core] opencv glew glfw3
- vcpkg integrate install
- vcpkg install --recurse yasm-tool:x86-windows
- vcpkg install --recurse --triplet %VCPKG_ARCH% zlib boost-iostreams boost-program-options boost-system boost-serialization eigen3 cgal[core] opencv vcglib glew glfw3
- cd "%APPVEYOR_BUILD_FOLDER%"
# preserve contents of selected directories and files across project builds
cache:
- 'C:\tools\vcpkg\installed'
build_script:
- git clone https://github.com/cdcseacave/VCG.git
- if "%platform%"=="Win32" set CMAKE_GENERATOR=-G"Visual Studio 15 2017"
- if "%platform%"=="x64" set CMAKE_GENERATOR=-G"Visual Studio 15 2017 Win64"
- mkdir bin && cd bin
- cmake %CMAKE_GENERATOR% -DCMAKE_BUILD_TYPE=%Configuration% -DCMAKE_TOOLCHAIN_FILE="C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCG_ROOT="%APPVEYOR_BUILD_FOLDER%\VCG" ..
- cmake %CMAKE_GENERATOR% -DCMAKE_BUILD_TYPE=%Configuration% -DCMAKE_TOOLCHAIN_FILE="C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake" ..
- cmake --build . --target ALL_BUILD --config %Configuration% -- /maxcpucount:4
-
#------------------
Expand All @@ -85,7 +84,7 @@ for:
- '/usr/lib/x86_64-linux-gnu/'
build_script:
- git clone https://github.com/cdcseacave/VCG.git
- git clone --single-branch --branch 3.2 https://gitlab.com/libeigen/eigen.git
- git clone --single-branch --branch 3.4 https://gitlab.com/libeigen/eigen.git
- mkdir eigen_build && cd eigen_build
- cmake . ../eigen
- make && sudo make install
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ CMakeSettings.json
.idea/
.vscode/
out/
bin/
binaries/
bin*/
37 changes: 31 additions & 6 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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.
* [Eigen](http://eigen.tuxfamily.org) version 3.2 (or higher on Windows only)
* [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
* [CGAL](http://www.cgal.org) version 4.2 or higher
Expand Down Expand Up @@ -33,7 +33,7 @@ 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 glew glfw3
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
Expand All @@ -46,7 +46,7 @@ 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 -DVCG_ROOT="..\VCG"
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
```
Expand All @@ -64,7 +64,7 @@ sudo apt-get -y install git cmake libpng-dev libjpeg-dev libtiff-dev libglu1-mes
main_path=`pwd`
#Eigen (Required)
git clone https://gitlab.com/libeigen/eigen.git --branch 3.2
git clone https://gitlab.com/libeigen/eigen.git --branch 3.4
mkdir eigen_build && cd eigen_build
cmake . ../eigen
make && sudo make install
Expand All @@ -82,7 +82,7 @@ sudo apt-get -y install libcgal-dev libcgal-qt5-dev
#VCGLib (Required)
git clone https://github.com/cdcseacave/VCG.git vcglib
#Ceres (optional)
#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
Expand Down Expand Up @@ -128,11 +128,36 @@ git clone https://github.com/cdcseacave/openMVS.git
#Build OpenMVS
mkdir openMVS_build && cd openMVS_build
cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_DIR="$main_path/vcglib"
cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib"
#Alternatively, build using XCode
cmake . ../openMVS -G "Xcode" -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib"
xcodebuild -configuration Release
#If you want to use OpenMVS as shared library, add to the CMake command:
-DBUILD_SHARED_LIBS=ON
#Install OpenMVS library (optional):
make && sudo make install
```

-------------------
Library usage
-------------------

In order to use *OpenMVS* as a third-party libray in your project, first compile it as described above or simply use `vcpgk`:
```
vcpkg install openmvs
```

And inside your project CMake script, use:
```
find_package(OpenMVS)
if(OpenMVS_FOUND)
include_directories(${OpenMVS_INCLUDE_DIRS})
add_definitions(${OpenMVS_DEFINITIONS})
endif()
add_executable(your_project source_code.cpp)
target_link_libraries(your_project PRIVATE OpenMVS::MVS)
```
Loading

0 comments on commit 961b1fe

Please sign in to comment.