OpenDroneMap-ODM/opendm/context.py

26 wiersze
771 B
Python
Czysty Zwykły widok Historia

2015-11-17 12:38:56 +00:00
import os
2015-11-19 12:00:34 +00:00
import sys
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')
2015-11-20 10:07:40 +00:00
ccd_widths_path = os.path.join(root_path, 'data/ccd_defs.json')
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-19 14:46:30 +00:00
# add opensfm to python 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
2015-11-27 10:00:43 +00:00
# add pmvs to python path
pmvs2_path = os.path.join(superbuild_path, "install/bin/pmvs2")
2015-11-17 13:59:41 +00:00
# Define supported image extensions
2015-11-27 10:00:43 +00:00
supported_extensions = {'.jpg','.jpeg'}
# Define the number of cores
num_cores = multiprocessing.cpu_count()