Update OpenSfM options

Former-commit-id: 95ceffebd1
gh-pages
Pau Gargallo 2015-09-03 18:25:45 +02:00
rodzic 4020240982
commit cb239b9b1d
1 zmienionych plików z 6 dodań i 2 usunięć

8
run.py
Wyświetl plik

@ -22,7 +22,6 @@ BIN_PATH_ABS = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
OPENSFM_PATH = os.path.join(BIN_PATH_ABS, "src/OpenSfM")
CORES = multiprocessing.cpu_count()
def get_ccd_widths():
"""Return the CCD Width of the camera listed in the JSON defs file."""
with open(BIN_PATH_ABS + '/ccd_defs.json') as jsonFile:
@ -689,8 +688,13 @@ def opensfm():
mkdir_p("opensfm")
# Configure OpenSfM
config = [
"use_exif_size: no",
"preemptive_threshold: 5",
"processes: {}".format(CORES),
]
with open('opensfm/config.yaml', 'w') as fout:
fout.write("use_exif_size: no\n")
fout.write("\n".join(config))
# Convert bundler's input to opensfm
run('"{}/bin/import_bundler" opensfm --list list.txt'.format(OPENSFM_PATH))