renamed cmvs to pmvs

pull/249/head
edgarriba 2015-11-30 15:47:08 +00:00
rodzic d546242093
commit dbd1943e3a
2 zmienionych plików z 37 dodań i 34 usunięć

Wyświetl plik

@ -1,34 +0,0 @@
import ecto
from opendm import io
from opendm import log
from opendm import system
from opendm import context
class ODMCmvsCell(ecto.Cell):
def declare_io(self, params, inputs, outputs):
inputs.declare("args", "The application arguments.", {})
inputs.declare("reconstruction_path", "Clusters output. list of reconstructions", [])
def process(self, inputs, outputs):
log.ODM_INFO('Running OMD CMVS Cell')
# get inputs
args = self.inputs.args
rec_path = self.inputs.reconstruction_path
# the path to create the model
model_path = io.join_paths(rec_path, 'models/pmvs_options.txt.ply')
if io.file_exists(model_path):
log.ODM_WARNING('Found a valid PMVS file')
log.ODM_INFO('Running OMD OpenSfm Cell - Finished')
return ecto.OK if args['end_with'] != 'opensfm' else ecto.QUIT
# run pmvs2
system.run('%s %s/ pmvs_options.txt ' % (context.pmvs2_path, rec_path))
log.ODM_INFO('Running OMD CMVS Cell - Finished')
return ecto.OK if args['end_with'] != 'cmvs' else ecto.QUIT

37
scripts/pmvs.py 100644
Wyświetl plik

@ -0,0 +1,37 @@
import ecto
from opendm import io
from opendm import log
from opendm import system
from opendm import context
class ODMPmvsCell(ecto.Cell):
def declare_io(self, params, inputs, outputs):
inputs.declare("args", "The application arguments.", {})
inputs.declare("reconstruction_path", "Clusters output. list of reconstructions", [])
outputs.declare("model_path", "Clusters output. list of reconstructions", [])
def process(self, inputs, outputs):
log.ODM_INFO('Running OMD PMVS Cell')
# get inputs
args = self.inputs.args
rec_path = self.inputs.reconstruction_path
# the path to create the model
model_path = io.join_paths(rec_path, 'models/pmvs_options.txt.ply')
# attach created model to output
self.outputs.model_path = model_path
if not io.file_exists(model_path):
log.ODM_DEBUG('Creating dense pointcloud in: %s' % model_path)
# run pmvs2
system.run('%s %s/ pmvs_options.txt ' % (context.pmvs2_path, rec_path))
else:
log.ODM_WARNING('Found a valid PMVS file in %s' % model_path)
log.ODM_INFO('Running OMD PMVS Cell - Finished')
return ecto.OK if args['end_with'] != 'pmvs' else ecto.QUIT