From cb239b9b1dd923145d436b51e69c8c7af8aa5dcd Mon Sep 17 00:00:00 2001 From: Pau Gargallo Date: Thu, 3 Sep 2015 18:25:45 +0200 Subject: [PATCH] Update OpenSfM options Former-commit-id: 95ceffebd18f3828c127951e48b091b18644ee19 --- run.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/run.py b/run.py index 8f6798b3..1da86258 100755 --- a/run.py +++ b/run.py @@ -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))