OpenDroneMap-ODM/run.py

41 wiersze
875 B
Python
Czysty Zwykły widok Historia

#!/usr/bin/python
2015-12-22 12:29:13 +00:00
from opendm import log
from opendm import config
from opendm import system
2015-08-27 12:59:35 +00:00
import sys
2015-11-26 12:15:02 +00:00
import ecto
2015-08-27 12:59:35 +00:00
2015-11-26 12:15:02 +00:00
from scripts.odm_app import ODMApp
2015-11-20 10:00:43 +00:00
def usage():
log.ODM_ERROR('USAGE: %s --project-path [project_path]' % sys.argv[0])
log.ODM_ERROR('OpenDroneMap app finished - %s' % system.now())
sys.exit(0)
2015-08-27 12:59:35 +00:00
if __name__ == '__main__':
log.ODM_INFO('Initializing OpenDroneMap app - %s' % system.now())
args = config.config()
# Force to provide the images path
if args.project_path is None:
usage()
2015-08-27 12:59:35 +00:00
# create an instance of my App BlackBox
# internally configure all tasks
app = ODMApp(args=args)
# create a plasm that only contains the BlackBox
plasm = ecto.Plasm()
plasm.insert(app)
2015-08-27 12:59:35 +00:00
# execute the plasm
plasm.execute(niter=1)
2015-08-27 12:59:35 +00:00
log.ODM_INFO('OpenDroneMap app finished - %s' % system.now())