Run OpenMVG on Mac. This time, we will run the tutorial that is installed by default and display the results.
macOS Mojave (version 10.14.5) pyenv+python 3.7.5 cmake 3.16.4 Xcode 11.3.1
Install the required python library
$ pip install sphinx
Clone source code from Github
$ git clone --recursive https://github.com/openMVG/openMVG.git
Edit openMVG / src / CMakeLists.txt Before editing:
# ==============================================================================
# IMAGE IO detection
# ==============================================================================
find_package(JPEG QUIET)
find_package(PNG QUIET)
find_package(TIFF QUIET)
After editing: (Add set ~)
# ==============================================================================
# IMAGE IO detection
# ==============================================================================
set(CMAKE_FIND_FRAMEWORK LAST)
find_package(JPEG QUIET)
find_package(PNG QUIET)
find_package(TIFF QUIET)
Build using Xcode
$ mkdir openMVG_Build
$ cd openMVG_Build
$ cmake -DCMAKE_BUILD_TYPE=RELEASE -G "Xcode" . ../openMVG/src/
$ xcodebuild -configuration Release
Run the tutorial
$ cd software/SfM
$ python3 tutorial_demo.py
In the tutorial, a 3D point cloud will be generated from the 10 images stored in the following folder. openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images
The internal parameters of the camera are also stored
$ cat K.txt
2905.88 0 1416
0 2905.88 1064
0 0 1
Download and install the mac version from the MeshLab site https://www.meshlab.net/
From [File]> [Import Mesh.] openMVG_Build/src/software/SfM/tutorial_out/reconstruction_sequential/colorized.ply Read
If it is displayed as shown below, it is successful.
Recommended Posts