Rolling shutter correction on split-merge

pull/1467/head
Piero Toffanin 2022-06-17 14:41:29 -04:00
rodzic 653faedf1c
commit 55ad45a3f3
3 zmienionych plików z 4 dodań i 6 usunięć

Wyświetl plik

@ -50,8 +50,6 @@ class OSFMContext:
log.ODM_WARNING('Found a valid OpenSfM tracks file in: %s' % tracks_file)
def reconstruct(self, rolling_shutter_correct=False, rerun=False):
# TODO: FIX calls from split-merge
reconstruction_file = os.path.join(self.opensfm_project_path, 'reconstruction.json')
if not io.file_exists(reconstruction_file) or rerun:
self.run('reconstruct')

Wyświetl plik

@ -28,11 +28,12 @@ class LocalRemoteExecutor:
to use the processing power of the current machine as well as offloading tasks to a
network node.
"""
def __init__(self, nodeUrl, rerun = False):
def __init__(self, nodeUrl, rolling_shutter = False, rerun = False):
self.node = Node.from_url(nodeUrl)
self.params = {
'tasks': [],
'threads': [],
'rolling_shutter': rolling_shutter,
'rerun': rerun
}
self.node_online = True
@ -447,7 +448,7 @@ class ReconstructionTask(Task):
log.ODM_INFO("==================================")
octx.feature_matching(self.params['rerun'])
octx.create_tracks(self.params['rerun'])
octx.reconstruct(self.params['rerun'])
octx.reconstruct(self.params['rolling_shutter'], self.params['rerun'])
def process_remote(self, done):
octx = OSFMContext(self.path("opensfm"))

Wyświetl plik

@ -107,8 +107,7 @@ class ODMSplitStage(types.ODM_Stage):
local_sp_octx.create_tracks(self.rerun())
local_sp_octx.reconstruct(args.rolling_shutter, self.rerun())
else:
# TODO: pass rolling shutter param here
lre = LocalRemoteExecutor(args.sm_cluster, self.rerun())
lre = LocalRemoteExecutor(args.sm_cluster, args.rolling_shutter, self.rerun())
lre.set_projects([os.path.abspath(os.path.join(p, "..")) for p in submodel_paths])
lre.run_reconstruction()