-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReadme
23 lines (21 loc) · 1.62 KB
/
Readme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
This repo contains the altered version of the OpenMVG pipeline, and the code to generate the swig wrapper.
1) Compiling OpenMVG and its wrap
I reccomand a local installation in a custom directory; I have changed the cmake to install the versions of ceres, osi and other libraries
used by the original authors of the pipeline.
a) mkdir build && cd build
b) cmake -DCMAKE_INSTALL_PREFIX:STRING="$some_path_on_your_machine/my_bin" -DCMAKE_BUILD_TYPE=RELEASE ../src/
c) cmake --build . --target install
d) Add the my_build directory to your PATH and LD_PATH
export PATH=$some_path_on_your_machine/my_bin/bin:$PATH
export LD_LIBRARY_PATH=$some_path_on_your_machine/my_bin/lib/:$LD_LIBRARY_PATH
Install the cecessary libraries via apt-get install python-dev
Force library link updates via sudo ldconfig
e) cd .. && mkdir build_sfm && cd build_sfm
f) cmake ../source_sfm -DPYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") /
-DPYTHON_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))"). && make
g) You now have the wrapper files, just copy sfm.py and _sfm.so to the pycode directory.
2) Running the pipeline
The pycode directory contains everything you need to run the simplified version of the pipeline:
- sfm_class.py contains the BA code and all the functions used in the pipeline
- depg.py is the file to launch. Sorry if it is messy, I have added some comment lines to make it usable
- dataset contains the data for the statue dataset: images, ground truth data and initial estimates before BA.