2015-11-17 12:38:56 +00:00
|
|
|
import os
|
2015-11-19 12:00:34 +00:00
|
|
|
import sys
|
2017-02-09 17:55:45 +00:00
|
|
|
from opendm import io
|
2015-11-27 10:00:43 +00:00
|
|
|
import multiprocessing
|
2015-11-17 12:38:56 +00:00
|
|
|
|
2015-11-18 16:37:41 +00:00
|
|
|
# Define some needed locations
|
2015-11-17 12:38:56 +00:00
|
|
|
scripts_path = os.path.abspath(os.path.dirname(__file__))
|
2015-11-18 16:37:41 +00:00
|
|
|
root_path, _ = os.path.split(scripts_path)
|
|
|
|
|
|
|
|
superbuild_path = os.path.join(root_path, 'SuperBuild')
|
2017-06-29 14:55:43 +00:00
|
|
|
superbuild_bin_path = os.path.join(superbuild_path, 'install', 'bin')
|
2016-02-16 20:20:35 +00:00
|
|
|
tests_path = os.path.join(root_path, 'tests')
|
|
|
|
tests_data_path = os.path.join(root_path, 'tests/test_data')
|
2015-11-17 12:38:56 +00:00
|
|
|
|
2015-11-19 12:00:34 +00:00
|
|
|
# add opencv to python path
|
|
|
|
pyopencv_path = os.path.join(superbuild_path, 'install/lib/python2.7/dist-packages')
|
|
|
|
sys.path.append(pyopencv_path)
|
2015-11-17 13:59:41 +00:00
|
|
|
|
2015-11-30 15:49:52 +00:00
|
|
|
# define opensfm path
|
2015-11-19 12:00:34 +00:00
|
|
|
opensfm_path = os.path.join(superbuild_path, "src/opensfm")
|
2015-11-18 16:37:41 +00:00
|
|
|
|
2016-02-04 13:17:45 +00:00
|
|
|
# define orb_slam2 path
|
|
|
|
orb_slam2_path = os.path.join(superbuild_path, "src/orb_slam2")
|
|
|
|
|
2018-12-02 17:45:26 +00:00
|
|
|
# define mve join_paths
|
2018-06-27 18:32:49 +00:00
|
|
|
makescene_path = os.path.join(superbuild_path, 'src', 'elibs', 'mve', 'apps', 'makescene', 'makescene') #TODO: don't install in source
|
2019-04-03 18:47:06 +00:00
|
|
|
dmrecon_path = os.path.join(superbuild_path, 'src', 'elibs', 'mve', 'apps', 'dmrecon', 'dmrecon')
|
|
|
|
scene2pset_path = os.path.join(superbuild_path, 'src', 'elibs', 'mve', 'apps', 'scene2pset', 'scene2pset')
|
2019-03-20 20:55:35 +00:00
|
|
|
|
2018-07-05 23:02:00 +00:00
|
|
|
poisson_recon_path = os.path.join(superbuild_path, 'src', 'PoissonRecon', 'Bin', 'Linux', 'PoissonRecon')
|
2018-10-24 16:30:09 +00:00
|
|
|
dem2mesh_path = os.path.join(superbuild_path, 'src', 'dem2mesh', 'dem2mesh')
|
2018-10-28 23:57:08 +00:00
|
|
|
dem2points_path = os.path.join(superbuild_path, 'src', 'dem2points', 'dem2points')
|
|
|
|
|
2016-03-24 17:35:29 +00:00
|
|
|
# define mvstex path
|
|
|
|
mvstex_path = os.path.join(superbuild_path, "install/bin/texrecon")
|
|
|
|
|
2015-12-11 21:24:52 +00:00
|
|
|
# define txt2las path
|
|
|
|
txt2las_path = os.path.join(superbuild_path, 'src/las-tools/bin')
|
2016-02-25 19:15:49 +00:00
|
|
|
pdal_path = os.path.join(superbuild_path, 'build/pdal/bin')
|
2015-12-11 21:24:52 +00:00
|
|
|
|
2015-11-30 15:49:52 +00:00
|
|
|
# define odm modules path
|
|
|
|
odm_modules_path = os.path.join(root_path, "build/bin")
|
2016-02-04 13:17:45 +00:00
|
|
|
odm_modules_src_path = os.path.join(root_path, "modules")
|
2015-11-30 15:49:52 +00:00
|
|
|
|
2017-02-09 17:55:45 +00:00
|
|
|
settings_path = os.path.join(root_path, 'settings.yaml')
|
|
|
|
|
2015-11-17 13:59:41 +00:00
|
|
|
# Define supported image extensions
|
2015-11-27 16:47:42 +00:00
|
|
|
supported_extensions = {'.jpg','.jpeg','.png'}
|
2015-11-27 10:00:43 +00:00
|
|
|
|
2018-06-27 18:32:49 +00:00
|
|
|
# Define the number of cores
|
2015-12-11 21:24:52 +00:00
|
|
|
num_cores = multiprocessing.cpu_count()
|